Hi! I'm trying to add toggle button to telerik toolbar with ability to change image on different states (IsChecked = true or false).
Here is the code sample:
<telerik:RadToolBar Height="43" HorizontalAlignment="Left" Name="RadToolBar1" VerticalAlignment="Top" Width="509" Background="#FF6A6A6A" GripVisibility="Collapsed" OverflowButtonVisibility="Collapsed" Grid.Row="1" Margin="0,2,0,0" Grid.RowSpan="2">
<ToggleButton x:Name="BtnRec" ToolTip="Start record" Width="32">
<ToggleButton.Style>
<Style TargetType="ToggleButton">
<Style.Triggers>
<Trigger Property="IsChecked" Value="false">
<Setter Property="Content">
<Setter.Value>
<Image Source="/3DSuit_01;component/Images/Rec_Mode.png"></Image>
</Setter.Value>
</Setter>
</Trigger>
<Trigger Property="IsChecked" Value="true">
<Setter Property="Content">
<Setter.Value>
<Image Source="/3DSuit_01;component/Images/Play.png"></Image>
</Setter.Value>
</Setter>
</Trigger>
</Style.Triggers>
</Style>
</ToggleButton.Style>
</ToggleButton>
</telerik:RadToolBar>
The problem is that there is no image shown on the button and button appears like tiny smooth on toolbar. The same code works fine with the standard (non telerik) toolbar, or without toolbar. Please help.
Thank You!
Hello Maksym,
This appears to be a bug in the
RadToolBar
. We logged in our
PITS
(
ToolBar: Image does not show when it is set via triggers in the style of a RadToggleButton in the ToolBar
) and updated your telerik points. Soon ( in the next 24 hours) you will be able to vote for it. Please accept our apologies for the inconvenience caused.
All the best,
Petar Mladenov
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it.
Learn more>>