是否可以从 Visual Studio 中的工具箱更改默认布局形式?
我已经尝试在谷歌中找到答案,但我可能没有使用正确的单词来获得有用的链接。
我使用 Visual Studio 2008 中的工具箱设计了一个 C# GUI。问题是最后我的 GUI 看起来并不好看,但功能对于我的应用程序来说是完美的。一些测试人员说我的 GUI 没有吸引力或者太无聊。
这就是为什么我想改进它,我想知道是否可以更改例如按钮的默认布局或 Visual Studio 中工具箱中的任何其他形式?
或者有人知道一个丰富的兼容C#的UI设计集合库吗?
I have already tried to find an answer in google but I am probably not using the correct words to get an useful link.
I designed a C# GUI using the toolbox in Visual Studio 2008. The thing is at the end my GUI is not good looking, but the functionality is perfect for my app. Some testers said that my GUI is not attractive or too boring.
That's why I want to improve it and I would like to know if it is possible to change for example the default layout of a button or any other form from the toolbox in visual studio?
Or does anyone knows a rich collection library for UI design compatible with C#?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
AFAIK,您始终可以从基本控件派生,覆盖它们的部分/全部行为或视觉属性。
针对您问题的其他部分,我认为 DevExpress 提供了相当丰富的此类控件集合。
AFAIK, you can always derive from the basic controls, override some/all of the behaviour or visual properties of them.
In responce to the other part of your question, I think DevExpress presents a fairly rich collection of such controls.
您始终可以派生控件并创建自己的控件。
如果您不喜欢 WinForms 或 WPF 外观/感觉,可以使用具有 WX.NET 的 WxWidgets Toolkit。
或者,如果您使用 Mono,则可以使用 GTK#。
You can always derive the controls and create your own.
You can use WxWidgets Toolkit which has WX.NET if you do not like WinForms or WPF look/feel.
Or, if you are using Mono, you can use GTK#.
自己制作并享受。
创建一个新的类文件并将此代码粘贴到:
http://pastebin.com/cZ8xzTXX
然后在同一个文件中创建一个新类:
当您研究代码时,您会注意到有 3 个主要函数:
构造函数将定义变量。
ColorHook 设置可供 PaintHook 使用的变量。
PaintHook 是绘制所有代码的函数。
我还包括关闭和最小化按钮。当你移动表单时,它是相当有问题的,所以我在 PaintHook() 中限制了窗口大小。
正如您在 Min/Close Classes 中看到的,有 MouseStates 来更改 MouseEvent 上的图形:
一个控件将出现在工具箱的顶部。
Make your own and enjoy.
Create a new class file and paste this code in:
http://pastebin.com/cZ8xzTXX
Then make a new class in the same file:
As you study the code, you notice there are 3 main functions:
Constructor will define the variables.
ColorHook sets the variables ready to be used in PaintHook.
PaintHook is the function that draws all of your code.
I have also included close and minimize button. It is quite buggy when you move the form so I have restricted the window size in the PaintHook().
As you see in the Min/Close Classes there are MouseStates in order to change the Graphics on a MouseEvent:
A control will appear at the top of your toolbox.