So I've got a pretty basic ListView, that has two columns. Sample code below:
<ListView Margin="0,0,0,10" x:Name="lvOpenItems" ItemsSource="{Binding Path=OpenItems}" ScrollViewer.HorizontalScrollBarVisibility="Disabled">
<ListView.View>
<GridView>
<GridViewColumn Header="DispenserId" DisplayMemberBinding="{Binding Path=DispenserId}" Width="100"/>
<GridViewColumn Header="ProductName" x:Name="pName" Width="200">
<GridViewColumn.CellTemplate>
<DataTemplate>
<TextBlock TextWrapping="Wrap" Text="{Binding Path=ProductName}" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
</GridView>
</ListView.View>
</ListView>
Now, the ProductName field can sometimes get a little long, so it needs to wrap. The above code works OK; the text wraps. However, I'm wondering if its possible to somehow get text wrapping enabled without having to specify the widths. Right now, if the user resizes the window, my column is stuck at 200. Ideally, what I'd want is to have the ProductName take up all the remaining space, and then wrap accordingly.
Is it possible to do this?