This question is locked. New answers and comments are not allowed.
Is it possible to retrieve the Value of Property that is a child of a Style.Setter node from code?
I was trying to do something like this to found out what the background color of a row was based on the style, but couldn't figure it out:
//Setter backgroundStyleColor = (from setter in row.Style.Setters where setter.???? == "BackGround" select setter).FirstOrDefault() as Setter;
Here are my styles:
<UserControl.Resources>
<Style TargetType="gridView:GridViewRow" x:Key="RowStyle">
<Setter Property="MinHeight" Value="20"/>
<Setter Property="BackGround" Value="#FFFFFF"/>
</Style>
<Style TargetType="gridView:GridViewRow" x:Key="AlternateRowStyle">
<Setter Property="MinHeight" Value="20"/>
<Setter Property="BackGround" Value="#EDF4FA"/>
</Style>
<Style x:Key="GroupRowStyle" TargetType="gridView:GridViewGroupRow">
<Setter Property="HorizontalAlignment" Value="Left" />
</Style>
</UserControl.Resources>
Thanks.
I was trying to do something like this to found out what the background color of a row was based on the style, but couldn't figure it out:
//Setter backgroundStyleColor = (from setter in row.Style.Setters where setter.???? == "BackGround" select setter).FirstOrDefault() as Setter;
Here are my styles:
<UserControl.Resources>
<Style TargetType="gridView:GridViewRow" x:Key="RowStyle">
<Setter Property="MinHeight" Value="20"/>
<Setter Property="BackGround" Value="#FFFFFF"/>
</Style>
<Style TargetType="gridView:GridViewRow" x:Key="AlternateRowStyle">
<Setter Property="MinHeight" Value="20"/>
<Setter Property="BackGround" Value="#EDF4FA"/>
</Style>
<Style x:Key="GroupRowStyle" TargetType="gridView:GridViewGroupRow">
<Setter Property="HorizontalAlignment" Value="Left" />
</Style>
</UserControl.Resources>
Thanks.