Can someone tell me why all Setters starting from the comments are not being applied, when
this style is referenced in my grid?
TIA.
<Style x:Key="readonlyGrid" TargetType="{x:Type igDP:XamDataGrid}"> <Setter Property="Theme" Value="Print Basic"/> <!-- WHY ARE THESE SETTERS NOT BEING APPLIED ?? --> <Setter Property="igDP:FieldLayoutSettings.DataRecordCellAreaStyle" Value="{StaticResource customCellArea}"/> <Setter Property="igDP:FieldLayoutSettings.FilterUIType" Value="LabelIcons"/> <Setter Property="igDP:FieldLayoutSettings.SelectionTypeCell" Value="Single"/> <Setter Property="igDP:FieldLayoutSettings.AllowAddNew" Value="False"/> <Setter Property="igDP:FieldLayoutSettings.AllowDelete" Value="False"/> <Setter Property="igDP:FieldLayoutSettings.HighlightAlternateRecords" Value="True"/> </Style>
I believe this is what Andrew Smith has pointed in his previous post - this is not possible with a style setter.
So can you setup a style that handles subobjects?
You can't use a Style setter to set a property on a subobject of an element. The code you are using there is setting a dependency property on the control as if its an attached property but those properties don't exist on xamDataGrid.