I have a databound list view and can set all the column widths manually except for the last. The data length of the last field varies greatly. The last column needs to expand to handle the width of the data and if greater scroll. I have tried setting the width of the last column to some very large number, but that drives the column header off the page. How do I calculate the min width that the last column needs to be to display the data and if it is large to keep the column header on the page?
<ListView x:Name="ListViewFlightPlans" Background="#FF000000" IsSynchronizedWithCurrentItem="True" Width="659.5" Height="Auto"
Foreground="#FFFDF3F3" BorderBrush="{x:Null}" VerticalAlignment="Bottom" Visibility="Hidden" >
<ListView.View>
<GridView>
<GridViewColumn Header="CID" DisplayMemberBinding="{Binding Path=CID}" Width="50"/>
<GridViewColumn Header="Callsign" DisplayMemberBinding="{Binding Path=ACID}" Width="65"/>
<GridViewColumn Header="Type" DisplayMemberBinding="{Binding Path=Type}" Width="65"/>
<GridViewColumn Header="Route" DisplayMemberBinding="{Binding Path=Route}" Width="900 e"/>
</GridView>
</ListView.View>
</ListView>