从 ToolStripPanel 中取消停靠 ToolStrip
开箱即用,似乎没有任何内置支持允许您的最终用户从其父 ToolStripPanel
中取消应用程序中的 ToolStrip
停靠。显然这是可能的,因为即使您的 Visual Studio IDE 允许您取消停靠/撕下/浮动工具条,但使用 ToolStrip
和 ToolStripPanel
的默认行为是不可能的代码>.
那么,有人有建议吗?我想让我们的最终用户能够撕下 ToolStrip
,并让它们自由地漂浮在他们想要的任何地方。
Out of the box, there doesn't appear to be any built-in support for allowing your end-users to undock the ToolStrip
s in your applications from their parent ToolStripPanel
s. Clearly it's possible because even your Visual Studio IDE allows you to undock/tear-off/float your tool strips, it's just isn't possible with the default behavior of the ToolStrip
and ToolStripPanel
.
So, does anyone have an advice? I'd like to allow our end users to be able to tear-off ToolStrip
s, and have them float freely wherever they'd like them.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我会研究DockPanel 套件。它并不是真正模拟 Visual Studio 的 Toolstrip 功能,而是模拟其浮动/可停靠窗口,但它确实可以像冠军一样处理停靠和撕裂。
I would look into the DockPanel suite. It's not really emulating Visual Studio's Toolstrip functionality so much as its floating/dockable windows, but it does handle docking and tearing like a champ.
似乎没有太多的事情可以做到这一点。
有一篇 CodeProject 文章 A Simple C# Toolbar Docking Framework,看起来是比 DockPanel 套件更轻量级的选项。
There doesn't seem like there's much around to do this.
There's a CodeProject article A Simple C# Toolbar Docking Framework, that looks to be a more light-weight option than DockPanel suite.