<ResourceDictionary xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"> <!-- Resource dictionary entries should be defined here. --> <Style TargetType="{x:Type telerik:GridViewCheckBox}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type telerik:GridViewCheckBox}"> <Grid HorizontalAlignment="Left" VerticalAlignment="Center" Width="13" Height="13"> <Grid Margin="0"> <Path x:Name="IndeterminatePath" Stretch="Fill" Stroke="#FF8D8D8D" StrokeThickness="1.5" HorizontalAlignment="Center" Margin="0" VerticalAlignment="Center" Width="7" Height="7" Visibility="Collapsed" Data="M14.708333,144.5L20.667,144.5"/> <Path x:Name="CheckedPath" Stretch="Fill" Stroke="#FF8D8D8D" StrokeThickness="1.5" HorizontalAlignment="Center" Margin="0" VerticalAlignment="Center" Visibility="Collapsed" Data="M32.376187,77.162509L35.056467,80.095277 40.075451,70.02144"/> </Grid> </Grid> <ControlTemplate.Triggers> <Trigger Property="IsChecked" Value="True"> <Setter Property="Visibility" TargetName="CheckedPath" Value="Visible"/> </Trigger> <Trigger Property="IsThreeState" Value="True"> <Setter Property="Visibility" TargetName="IndeterminatePath" Value="Visible"/> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> </ResourceDictionary>
<telerik:GridViewDataColumn Name="GridColumnSelector" Header=""> <telerik:GridViewDataColumn .CellTemplate> <DataTemplate> <RadioButton Name="rdCheck" GroupName="RadioSelectors" /> </DataTemplate> </telerik:GridViewDataColumn .CellTemplate> </telerik:GridViewDataColumn >
public
class TngButton : TngBaseTemplateControl
{
static TngButton()
{
DefaultStyleKeyProperty.OverrideMetadata(
typeof(TngButton), new FrameworkPropertyMetadata(typeof(TngButton)));
}
#endregion
public override void OnApplyTemplate()
{
base.OnApplyTemplate();
RadButton btn = this.Template.FindName("PART_BaseControl", this) as RadButton;
ContentPresenter content = this.Template.FindName("PART_ContentControl", this) as ContentPresenter;
btn.Hover+=new EventHandler<Telerik.Windows.RadRoutedEventArgs>(btn_Hover);
}
void btn_Hover(object sender, EventArgs e)
{
// code to change the image at the hover .
}
i want to have two properties like 'originalimage' and 'hoverimage" which can be changed on mover hover action
can you help me in how to setting the logic for this ?
regards,
Srinivas