change default selected cell colour

4 posts, 0 answers
  1. Chris
    Chris avatar
    14 posts
    Member since:
    Sep 2014

    Posted 07 Oct 2014 Link to this post

    Is there a quick way to change the default selected cell colour from that light brown to whatever other colour I wish?
  2. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 07 Oct 2014 Link to this post

    Hello Chris,


    Thank you for contacting us. 

    You may predefine the template of GridViewCell and manipulate the visual element with x:Name Background_Selected, as proposed below:

    <Border x:Name="Background_Selected" Margin="1 1 2 2" BorderThickness="1" CornerRadius="1"
                            BorderBrush="{StaticResource ItemOuterBorder_Selected}"
                            Grid.Column="2" Grid.ColumnSpan="2" Visibility="Collapsed">
        <Border BorderThickness="1" BorderBrush="{StaticResource ItemInnerBorder_Selected}"
                            Background="{StaticResource ItemBackground_Selected}" />
    </Border>

    *the mark-up above is against the default Office_Black theme. 

    You could also check our online documentation for further reference. 

    Regards,
    Vanya Pavlova
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. Chris
    Chris avatar
    14 posts
    Member since:
    Sep 2014

    Posted 07 Oct 2014 in reply to Vanya Pavlova Link to this post

    Thank you for the response. I have read the articles, but where do I put the border element? within the radgridview element?
  4. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 07 Oct 2014 Link to this post

    Hello Chris,


    Thank you for getting back to us. 

    Background_Selected element is part of the template of GridViewCell, located within Telerik.Windows.Controls.GridView.xaml. 

    I'm attaching you small sample demo, which illustrates how to modify this element against Office_Black theme. Microsoft Expression Blend image preview is included, as well. 

    Please take a look at this demo and let me know how I can assist you further. 


    Regards,
    Vanya Pavlova
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top