hi there,
i wonder how i can prevent a user from resizing GridViewColumns withing a WPF ListView control as google doesn't came up wit a solution.
probably one of the wpf guru's over here ;)
hi there,
i wonder how i can prevent a user from resizing GridViewColumns withing a WPF ListView control as google doesn't came up wit a solution.
probably one of the wpf guru's over here ;)
i found a solution and probably it will help someone else someday ;)
you have to override the GridViewColumnHeader's ControlTemplate (default template is here ) and remove the PART_HeaderGripper from the template in order to prevent resizing of your columns.
there is another solution that comes up with subclassing GridViewColumn described here. for representation purposes i prefer xaml only solutions though
thans for this beautiful answer. but 1 thing i want to know. if i want that user can resize the column but upto a certain limit. then what can i do? please help me. thanks..
Hi! Someone know how I can resize a Grid column size at runtime? Thanks in advance for your help!
I was able to do something similar with the instructions in this post
http://blogs.msdn.com/b/atc_avalon_team/archive/2006/04/11/573037.aspx
I wasn't able to use a full XAML solution, since I was building everything in my code behind due to the dynamics of it. Worked great on the first try.