Hello,
i have a problem with wpf-grid in .net-framework. I have defined a grid in a UserControl, which contains a listview, that shows some content. The content of the listview is presented with DataTemplate and contains a TextBlock which could getting very wide. My grid should separate the UserControl in two 50-50 parts. Both parts should have the same size. If the content in the described TextBlock is small enough there is no Problem. The ListViewItem isn't getting to wide and the columns both taking 50% of the screen. But if the ListViewItem getting more wide, the first column of the grid getting the width of the listviewitem. I know that this could be prevented with MaxWidth, but the problem is that MaxWidth is an absolute value and i get a whitespace if the column is wider.
Is there a way to set MaxWidth to a relative property, that i don't get a too wide column?
My current Column-Definitions are:
<Grid.ColumnDefinitions>
<ColumnDefinition Width="200*" />
<ColumnDefinition Width="200*" />
</Grid.ColumnDefinitions>
Would be nice if there are any advices,
Thanks, Greetings, Martin