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

using ConditionalStyleSelector in code

0 Answers 187 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Oliver
Top achievements
Rank 1
Oliver asked on 27 Feb 2013, 08:27 AM
How do I convert the following xaml in code:

<telerik:GridViewDataColumn.CellStyleSelector>
                        <telerik:ConditionalStyleSelector>
                            <telerik:StyleRule Condition="UnitPrice > 10">
                                <Style TargetType="telerik:GridViewCell"
                                       BasedOn="{StaticResource GridViewCellStyle}">
                                    <Setter Property="Background"
                                            Value="{StaticResource AccentBrush}" />
                                    <Setter Property="Foreground"
                                            Value="{StaticResource MainBrush}" />
                                </Style>
                            </telerik:StyleRule>
                            <telerik:StyleRule Condition="UnitPrice &lt;= 10">
                                <Style TargetType="telerik:GridViewCell"
                                       BasedOn="{StaticResource GridViewCellStyle}" />
                            </telerik:StyleRule>
                        </telerik:ConditionalStyleSelector>
                    </telerik:GridViewDataColumn.CellStyleSelector>

No answers yet. Maybe you can help?

Tags
GridView
Asked by
Oliver
Top achievements
Rank 1
Share this question
or