WPF 用户控制网格列宽
我有一个网格,目前有三列。第一列包含一个 WrapPanel。第二列占据剩余空间,第三列是固定宽度。
我希望用户能够重新分配第一列和第二列之间的空间 - 即两列之间某种形式的可拖动划分,这将相应地调整它们的大小。
任何指示将不胜感激。我不知道从哪里开始!
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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想你想研究一下 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 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