I've got a DataGrid containing some DataGridTextColumn and would like to apply a simple LayoutTransform to the cells, but not the header.
Problem is, DataGridTextColumn does not offer LayoutTransform.
I was able to apply LayoutTransformation to a DataGridTemplateColumn, but I lost a whole lot of functional and was unable to build it back.
My sample so far was:
<DataGridTemplateColumn Header="Satz">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="3,0,4,1" Text="{Binding Satz}">
<TextBlock.LayoutTransform>
<ScaleTransform ScaleX="1.4" ScaleY="1.4"/>
</TextBlock.LayoutTransform>
</TextBlock>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
<DataGridTemplateColumn.CellEditingTemplate>
<DataTemplate>
<TextBox BorderThickness="0" Text="{Binding Satz, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}">
<TextBox.LayoutTransform>
<ScaleTransform ScaleX="1.4" ScaleY="1.4"/>
</TextBox.LayoutTransform>
</TextBox>
</DataTemplate>
</DataGridTemplateColumn.CellEditingTemplate>
</DataGridTemplateColumn>
I'm looking for one of two ways:
- either to scale DataGridTextColumn.
Or, if thats not possible to
- change the DataGridTemplateColumn so it supports all the functionalty of the DataGridTextColumn (Sorting, editing) and, most important, offers the same user interface (right now the editing in the templatecolumn works different from the textcolumn).