Have view with RadGridView with RowStyleSelector:
And resources is:
RowStyleSelector is next:
In Silverlight UI 2013 Q3 appear following bug:
When s.Editable is false, style color (UneditableStyle) row correct.
When s.Editable becomes true, SelectStyle return null , but row was still colored and it's style is UneditableStyle, not default style (no style) as it was in 2013 Q2. But it must be default.
<
telerik:RadGridView
...
RowStyleSelector
=
"{StaticResource myStyle}"
...
/>
And resources is:
<
Grid.Resources
>
<
localss:MyStyle
x:Key
=
"myStyle"
>
<
localss:MyStyle.UneditableStyle
>
<
Style
TargetType
=
"telerik:GridViewRow"
BasedOn
=
"{StaticResource GridViewRowStyle}"
>
<
Setter
Property
=
"Background"
Value
=
"LightGray"
/>
</
Style
>
</
localss:MyStyle.UneditableStyle
>
</
localss:MyStyle
>
</
Grid.Resources
>
RowStyleSelector is next:
public
class
MyStyle: StyleSelector
{
public
override
Style SelectStyle(
object
item, DependencyObject container)
{
var s = item
as
MyObject;
if
(s ==
null
)
return
null
;
if
(!s.Editable)
return
UneditableStyle;
return
null
;
}
public
Style UneditableStyle {
get
;
set
; }
}
In Silverlight UI 2013 Q3 appear following bug:
When s.Editable is false, style color (UneditableStyle) row correct.
When s.Editable becomes true, SelectStyle return null , but row was still colored and it's style is UneditableStyle, not default style (no style) as it was in 2013 Q2. But it must be default.