如何使窗口的形式看起来更漂亮 [英] How to make window forms look More Beautiful

查看:150
本文介绍了如何使窗口的形式看起来更漂亮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Windows窗体应用程序用C#编写。我必须让我的窗体的设计更具吸引力(Windows 7的样子)。是否有任何第三方工具,使表格看起来更漂亮?

I have a Windows Forms application written in C#. I have to make my form's design more attractive (Windows 7 look). Are there are any third party tools to make forms look more beautiful?

推荐答案

如果你想主题的Windows Aero用户界面内置控件,你可以找到几个投递控件库在线。

If you're trying to theme the built-in controls with the Windows Aero user interface, you can find several drop-in control libraries online.

  • Windows Forms Aero
  • Aero.Controls
  • Microsoft's Windows API Code Pack for the .NET Framework
  • Fully themed Windows Vista Controls


大部分这些库包括桌面窗口管理器的功能,包括增加的Aero玻璃效果,你的应用程序的支持。丹尼尔蛾解释了这个更详细了一系列在他的博客文章:


Most of those libraries include support for the Desktop Window Manager functions, including adding the Aero Glass effect to your application. Daniel Moth explains this in greater detail in a series of articles on his blog:

  • Vista: Glass in C#
  • Glass in C#, an alternative approach
  • Vista glass answers and DwmEnableBlurBehindWindow

当然,你可以快速获得在你的头上。特别是,在标准控件不正确地经玻璃,因为颜色黑色呈现为透明渲染。凡是显示黑色
文本看起来冲了出去,成为不可读。正确的方法利用扩展玻璃面积的文字和图片在这里描述:绘图流畅的文字和图片上扩展玻璃面积

Of course, you can quickly get in over your head. In particular, the standard controls do not render correctly over glass because the color black is rendered as transparent. Anything that displays black
text will look washed out and be unreadable. The right way to draw text and images on the extended glass area is described here: Drawing smooth text and pictures on the extended glass area.

你还必须记住,这些功能的只有的适用于Windows Vista和更高版本。如果你的应用程序需要在Windows XP(它可能不会)运行,你将不得不以确保您的应用程序回落优雅,你的用户界面看起来不错那里。

You'll also have to remember that these features are only available on Windows Vista and later versions. If your application needs to run under Windows XP (which it probably does), you're going to have to make sure that your application falls back gracefully and that you UI looks good there, too.

如果您需要Aero玻璃效果的更多信息,搜索堆栈溢出。我和许多其他人发布大量的回答相关问题的。例如,<一个href="http://stackoverflow.com/questions/4096609/c-how-to-make-a-windows-7-aero-winform-blured-glass">this 之一,和<一href="http://stackoverflow.com/questions/4162781/windows-explorer-like-application/4163912#4163912">this 之一,和<一href="http://stackoverflow.com/questions/4420528/how-can-i-get-aero-glass-on-a-windows-form-without-borders/4420564#4420564">this 之一。

If you need more information on Aero Glass effects, search Stack Overflow. Myself and many others have posted lots of answers to related questions. For example, this one, and this one, and this one.


但一般情况下,我的建议是使用玻璃效果谨慎,只有当你真正感受到它增加了一些你的应用程序。不要只扔在无偿眼睛糖果,因为你可以。最重要的是把重点放在的易用的应用程序,从它的典型用户的角度看的。没有理由添加额外的,不提供任何实际的可用性的好处的复杂性。


In general, however, my suggestion is to use the glass effect sparingly and only when you really feel that it adds something to your application. Don't just throw in gratuitous eye candy because you can. The most important thing is to focus on the usability of your application, from the perspective of its typical user. There is no reason to add additional complexity that doesn't provide any real usability benefits.

这篇关于如何使窗口的形式看起来更漂亮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆