WPF用户控制的网格列宽 [英] WPF user controlled grid column width
问题描述
我有一个网格,目前有三列。第一列包含一个WrapPanel。第二列占用剩下的空间,第三列是固定宽度。
我希望用户能够重新分配第一列和第二列之间的空间 - 也就是说,两列之间的某种形式的可拖动划分,调整它们的大小。
任何指针将不胜感激。我不知道从哪里开始!
我想你想看看一个GridSplitter: http://msdn.microsoft.com/en-us/library/system.windows .controls.gridsplitter.aspx
查阅: http://msdn.microsoft.com/en-us/library/ms753302.aspx 或 http://www.devcurry.com/2010/08/using-gridsplitter-in-windows.html
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!
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
这篇关于WPF用户控制的网格列宽的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!