I'm a using a ListView with GridViewColumn in my C# WPF application.
For some columns I use a Visibility manager (this one). But When column 1 and 3 are visible and column 2 not, resizing column 1 makes column 2 appear if cursor is too right.
Is it possible to disable resizing (and unactibe cursor) on column if IsVisible is false ?
I saw that post, but I can't use it on the GridViewColumnVisibilityManager
, my columns are not always fixed.
The part of GridViewColumnVisibilityManager
interesting :
private static void OnIsVisibleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
GridViewColumn gc = d as GridViewColumn;
if (gc == null)
return;
if (GetIsVisible(gc) == false)
{
originalColumnWidths[gc] = gc.Width;
gc.Width = 0;
// Fix Size there
}
else
{
if (gc.Width == 0)
{
gc.Width = originalColumnWidths[gc];
//UnFix
}
}
}
Is it possible to programmatically remove gripper from columns ?
One is to restyle GridViewColumnHeader to remove the gripper inside its Template