This is a migrated thread and some comments may be shown as answers.

GridViewCheckbox Highlighting

1 Answer 100 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Gertjan
Top achievements
Rank 1
Gertjan asked on 30 Apr 2015, 02:09 PM

Hi all,

I took the style out of blend of the GridViewCheckbox component, but can't seem to find to change this:

I would like to remove the highlight yellow collor. I'm changing my application to another color, but only this yellow highlight color i cant find how to. 

This is the code:

<Style TargetType="{x:Type telerik:GridViewCheckBox}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type telerik:GridViewCheckBox}">
                    <Grid HorizontalAlignment="Left" Height="13" VerticalAlignment="Center" Width="13">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CheckStates">
                                <VisualState x:Name="Checked">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="0" Duration="0" Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="CheckedPath">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unchecked"/>
                                <VisualState x:Name="Indeterminate">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="0" Duration="0" Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="IndeterminatePath">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border BorderBrush="#FF989898" BorderThickness="1">
                            <Border BorderBrush="#FFEEEEEE" BorderThickness="1">
                                <Border BorderBrush="#FFB9B9B9" BorderThickness="1" Background="#FFE0E0E0">
                                    <Grid Margin="0">
                                        <Path x:Name="IndeterminatePath" Data="M14.708333,144.5L20.667,144.5" HorizontalAlignment="Center" Height="7" Margin="0" Stretch="Fill" Stroke="#FF8D8D8D" StrokeThickness="1.5" Visibility="Collapsed" VerticalAlignment="Center" Width="7"/>
                                        <Path x:Name="CheckedPath" Data="M32.376187,77.162509L35.056467,80.095277 40.075451,70.02144" HorizontalAlignment="Center" Margin="0" Stretch="Fill" Stroke="#FF8D8D8D" StrokeThickness="1.5" Visibility="Collapsed" VerticalAlignment="Center"/>
                                    </Grid>
                                </Border>
                            </Border>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

 

What do i miss??

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 05 May 2015, 11:42 AM
Hi Gertjan,

For achieving such customization, I suggest you using Implicit Styles with NoXAML binaries.

Within Telerik.Windows.Controls.Navigation.xaml file, please search for the following LinearGradientBrush elements and modify them per your requirements:
<LinearGradientBrush x:Key="CheckBoxInnerBorder_MouseOver" EndPoint="0.854,0.854" StartPoint="0.146,0.146">
        <GradientStop Color="#FFFFC314" Offset="0"/>
        <GradientStop Color="#FFF2D9A6" Offset="1"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="CheckBoxInnerBackground_MouseOver" EndPoint="0.854,0.854" StartPoint="0.146,0.146">
        <GradientStop Color="#FFFFE89B"/>
        <GradientStop Color="#FFFFFFFF" Offset="1"/>
    </LinearGradientBrush>

I hope this helps.

Best Regards,
Stefan
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
GridView
Asked by
Gertjan
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or