<Window.Resources> <ControlTheme x:Key="int" TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}"> <Setter Property="HorizontalAlignment" Value="Right" /> </ControlTheme> <ControlTheme x:Key="str" TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}"> <Setter Property="HorizontalAlignment" Value="Left" /> </ControlTheme> </Window.Resources>
var controlTheme = this.Find<ControlTheme>("x:Key=int"); var controlTheme = this.Find<ControlTheme>("int");....
var eng = new DataGridTextColumn(); eng.CellTheme = this.Find<ControlTheme>("int");
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)