I have a TextBox
in a DataGridTemplateColumn
in a WPF datagrid.It doesn't inherit the look and feel of the datagrid itself.For example it doesn't show the alternating color, when a row is selected or edited.
<DataGridTemplateColumn>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBox Text="{Binding ...}" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
看起来默认文本框的样式覆盖了. 的样式DataGrid
。有没有办法使用 datagrids 样式?