Is there an option to hide a GridViewColumn somehow like this:
<ListView.View><GridView><GridViewColumn Header="Test" IsVisible="{Binding Path=ColumnIsVisible}" /></GridView><ListView.View>
Edit: For clarity
Unfortunately, there is no "IsVisible" Property. I'm looking for a way to create that.
Edit: The solution based on the feedback looks like:
<GridViewColumn DisplayMemberBinding="{Binding Path=OptionColumn1Text}" Width="{Binding Path=SelectedEntitiy.OptionColumn1Width}"><GridViewColumnHeader Content="{Binding Path=SelectedEntitiy.OptionColumn1Header}" IsEnabled="{Binding Path=SelectedEntitiy.OptionColumn1Width, Converter={StaticResource widthToBool}}" /></GridViewColumn>public class WidthToBooleanConverter : IValueConverter{ public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { return (int)value > 0; } public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { throw new NotImplementedException(); }}