Disable GridViewColumn Resize

Elmo picture Elmo · Jul 29, 2011 · Viewed 8.5k times · Source

Is there any way by which I can disable GridViewColumn resize in WPF? I don't want to style the control.

Answer

Fredrik Hedblad picture Fredrik Hedblad · Jul 29, 2011

See this link: Fixed-Width Column in ListView: A Column that cannot be resized

A fixed-width column is a column that cannot be resized by mouse dragging or double-clicks. You can find instances in outlook. Currently two methods can be used to achieve the effect. One is to restyle GridViewColumnHeader to remove the gripper inside its Template. The other is to subclass GridViewColumn to restrict columns' width to a fixed size.