.NET WinForms ToolStrip 替代品
我正在寻找标准 WinForms ToolStrip 控件的替代品,因为这个标准工具栏控件看起来已经过时了。
例如,DevExpress 有一个功能区控件,但这并不是完全等效的。
我确信一定有许多为 WinForms 定制的工具栏,但很难找到。尽管我可以创建自己的控件,但这并不总是最好的解决方案。
I'm looking for a replacement to standard WinForms ToolStrip control, because this standard toolbar control looks outdated.
For example, DevExpress has a ribbon control, but that's not an exact equivalent.
I'm sure there must be many custom-written toolbars for WinForms, but having difficulties finding any. Although I can create my own control, it's not always the best solution.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
.Net
ToolStrip
控件可以使用派生自ToolStripRenderer
的类进行自定义呈现。这篇 CodeProject 文章展示了一个这样的示例。提供了一个自定义
ToolStripRenderer
,它可以将ToolStrip
控件呈现为 Office 2007 的一部分。源代码可用。您还可以使用旧的
MainMenu
、ContextMenu
和Toolbar
类来代替Toolstrip
控件。这些控件以当前操作系统风格呈现。注意:这些不是直接替代品,因为它们对条带控件具有不同的 API,因此如果您的应用程序已经进入开发阶段,这将不是最简单的解决方案。
The .Net
ToolStrip
controls can be custom rendered using a class that derives fromToolStripRenderer
.This CodeProject article shows an example of this. A custom
ToolStripRenderer
is provided which renders theToolStrip
controls to look as though they are part of Office 2007. The source code is available.You can also use the old
MainMenu
,ContextMenu
andToolbar
classes instead of theToolstrip
controls. These controls are rendered in the current operating system style.NOTE: These are not direct replacements as they have different API's to the strip controls so if your application is already fairly far into development this won't be the easiest solution.
查看KryptonToolkit。它附带 Office 2007 等内置调色板,通过将 ToolStrip 控件的 RenderMode 属性设置为“ManagerRenderMode”,可以与标准 ToolStrip 控件一起使用。
Take a look at the KryptonToolkit. It comes with Office 2007, etc, built in colour palettes that ca be used with the standard ToolStrip control by setting the RenderMode property of the ToolStrip control to 'ManagerRenderMode'.
尝试 .NET ToolStrip 定制器。它可以自动为 ToolStrips 生成颜色主题并将其保存到 C# 文件中。它预设了一些常见主题,如 Office 2077、Office XP 等。
Try out .NET ToolStrip Customizer. It can automatically generate color themes for ToolStrips and save them to C# files. It has presets for some common themes like Office 2077, Office XP, etc.