Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
704
Bind "BackgroundActive" to ViewModel property
posted

Hello,

I have the following XAML and the BackgroundActive property in my ViewModel gets read, but doesn't seem to get set in the datagrid.  If I hardcode a brush color to the BackgroundActive value, it displays as it should.  Any help much appreciated.

 

 

 

 

 

<igDP:XamDataGrid Name="DocumentsGrid" DataSource="{Binding Documents}" ActiveDataItem="{Binding SelectedRow}" RecordLoadMode="{Binding GridRecordLoadMode, Mode=OneTime}" RecordContainerGenerationMode="{Binding ContainerGenerationMode, Mode=OneTime}">

 

 

 

 

<igDP:XamDataGrid.Resources>

 

 

 

 

<Style TargetType="{x:Type igDP:DataRecordCellArea}">

 

 

 

 

<Setter Property="BackgroundActive" Value="{Binding DataContext.ActiveGridRowColor, ElementName=DocumentsGrid, Mode=OneWay}"/>

 

 

 

 

</Style>

 

 

 

 

</igDP:XamDataGrid.Resources>

 

 

 

 

 

<igDP:XamDataGrid.FieldSettings>

 

 

 

 

<igDP:FieldSettings AllowEdit="False" />

 

 

 

 

</igDP:XamDataGrid.FieldSettings>

 

 

 

 

 

</igDP:XamDataGrid>