A wpf DataGrid has this DataGridTemplateColumn:
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Grid Margin="0">
<ListView .....>
...
</ListView>
</Grid>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
The ListView has
<ListView.View>
<GridView>
...
with four GridViewColumn’s each with a DataTemplate.
One DataTemplate with a TextBox, one with a TextBlock, two with Label.
What I don’t get is, why the Height of these TextBox / TextBlock / Label
does not want to stretch to the height of the DataGridRow.
It looks as if there is a Margin or Padding between the edges of DataGridRow and the control of the DataTemplates.
E.g. the desired height of the lowest level controls is 16 pix. but the datagridcell has a
height of 20 pix.
Every Margin and Padding is set to 0 (zero) and every VerticalAlignment or VerticalContentAlignment is set to Stretch.
I cannot get rid of the “gap”. Any idea why this is so difficult?
2