You can disable resizing the columns of a datagrid.
Is there a way to stop resizing the rowsheader Height
At this moment the user can resize the row Headers. Like this:
I want to disable this. So it should always look:
That's my RowHeaderTemplate
<DataGrid.RowHeaderTemplate>
<DataTemplate>
<DockPanel FlowDirection="LeftToRight" DataContext="{Binding Item,RelativeSource={RelativeSource AncestorType={x:Type DataGridRow}}}">
<TextBlock Text="{Binding ZimmerNummer}" MinWidth="48" MaxWidth="48" />
</DockPanel>
</DataTemplate>
</DataGrid.RowHeaderTemplate>
That was my idea:
<DataGrid.RowHeaderStyle>
<Style TargetType="DataGridRowHeader">
<Setter Property="MaxHeight"
Value="55"/>
</Style>
</DataGrid.RowHeaderStyle>
But it was not work. That was the result:
Do someone know a Solution for that?