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

Style Selector

1 Answer 62 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 03 Jul 2013, 01:48 AM
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>

1 Answer, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 03 Jul 2013, 08:20 AM
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 >>
Tags
GridView
Asked by
Mark
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Share this question
or