不填充高度的 WPF 固定选项
我正在寻找一个 WPF 选项,可以在侧面显示面板,并允许您固定/取消固定它们。基本上,这意味着一个窗口,其中一个主控件位于中心,并且该主控件的左侧和右侧都有多个不同的面板。默认情况下,这些面板是折叠的,只有标题可见,如果我将鼠标悬停在它们上方,它们会在主控件上展开(不会取代主控件),但我也可以选择固定此面板,使其永久展开出,这一次迫使主中心控件调整大小。
现在,这听起来很像大多数对接控制选项,实际上我已经研究过 Avalon 和 MixModes Synergy ,但这些选项的问题是它们的面板填满了整个高度。我希望当我将鼠标悬停在特定高度的面板上时,它会出现,我不希望它填充到屏幕上,而且我真的找不到其他任何可以做到这一点的东西。还有其他人见过这样的事情吗?
基本上,到目前为止,我自己关于如何做到这一点的想法涉及以编程方式将面板从一个固定控件移动到另一个非固定控件,但这听起来很丑陋,我喜欢替代方案。
I'm looking for a WPF option that shows panels on the sides, and allows you to pin/unpin them. Basically this means a Window, with a main control in the center and multiple different panels on both the left and right sides of this main control. These panels are collapsed by default, with just their headers visible, and if i hover over them they expand out OVER the main control (without displacing the main control), but i also have the option to pin this panel, where it stays permanantly expanded out, this time forcing the main center control to resize.
Now this sounds pretty much like most docking control options, and indeed i've looked at Avalon and MixModes Synergy , but the problem with these options is that their panels fill out the entire height. I want a panel of a specific height to come out when i hover over it, i don't want it to fill out to screen, and i can't really find anything else that does that. Anyone else seen something like this?
Basically my own ideas on how to do this so far involve programmatically moving the panel from one pinned control to another non-pinned control, but this sounds crazy ugly and i'd love alternatives.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
下面是一个纯 XAMl 示例,说明如何实现固定/取消固定功能。
在上面的代码中,
对接网格列。
您可以自定义此示例和包括将显示/隐藏面板的鼠标悬停事件。
HorizontalAlignment="Right"
会给你正确的面板。
将添加顶部/底部引脚功能。
Here is a pure XAMl example of how you can achieve Pin/Unpin functionality.
In the above code,
docking grid column.
You may customize this example & include the mouseover events which will show/hide the panels.
HorizontalAlignment="Right"
will give you right panel.
will add top/bottom pin functionality.