Style Selector

2 posts, 0 answers
  1. Mark
    Mark avatar
    61 posts
    Member since:
    Dec 2010

    Posted 02 Jul 2013 Link to this post

    I have a CellStyleSelector that is used in multiples datagrids and I want to code it once. Currently it is in each view as a grid.resource. Any pointers on where and how it should be coded to make it a global resource.

    This is the CellStyleSelector

    <Selectors:AdjCellStyleSelector x:Key="adjCellStyleSelector">
                                <Selectors:AdjCellStyleSelector.NormalStyle>
                                    <Style TargetType="telerik:GridViewCell">
                                        <Setter Property="Background"
                                                        Value="Transparent" />
                                    </Style>
                                </Selectors:AdjCellStyleSelector.NormalStyle>
                                <Selectors:AdjCellStyleSelector.AdjStyle>
                                    <Style TargetType="telerik:GridViewCell">
                                        <Setter Property="Background"
                                                        Value="PeachPuff" />
                                    </Style>
                                </Selectors:AdjCellStyleSelector.AdjStyle>
                            </Selectors:AdjCellStyleSelector>
  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 03 Jul 2013 Link to this post

    Hi,

    You can define the style selector inside the Application's Resources (App.Resources) section. How does this work for you?

    Regards,
    Didie
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top