问题
I've got a grid, currently with three columns. The first column contains a WrapPanel. The second column takes up whatever space is left, and the third column is a fixed width.
I want the user to be able to re-distribute the space between the first and second column - that is, some form of dragable division between the two columns, that will resize them accordingly.
Any pointers would be appreciated. I'm not sure where to start!
回答1:
I think you want to look into a GridSplitter: http://msdn.microsoft.com/en-us/library/system.windows.controls.gridsplitter.aspx
Check out : http://msdn.microsoft.com/en-us/library/ms753302.aspx or http://www.devcurry.com/2010/08/using-gridsplitter-in-windows.html
来源:https://stackoverflow.com/questions/5156519/wpf-user-controlled-grid-column-width