WPF user controlled grid column width

戏子无情 提交于 2019-12-11 07:28:50

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!