Hi, in .NET Framework 4.0, C# WPF form, on my UserControl Grid I defined a datagrid 'myDataGrid' with style and some properties.
I did not put any code in the UC Resources block
The 'myDataGrid' is bound to a datatable at runtime.
Now, at runtime I have to generate additional dynamic datagrids that have the same style and properties like the 'myDataGrid'. I can generate dynamic datagrids and bound them to data but their style/properties are not like 'myDatagrid'
<DataGrid Grid.Row="0" Name="myDataGrid" SelectionUnit="CellOrRowHeader" ItemsSource="{Binding}"><DataGrid.RowStyle><Style TargetType="{x:Type DataGridRow}"><Style.Triggers><DataTrigger Binding="{Binding STATUS}" Value="ACTIVE"><Setter Property="Foreground" Value="Green"/></DataTrigger></Style.Triggers></Style></DataGrid.RowStyle></DataGrid>Thanks,
-sri
sri