Windows窗体应用程序C#风格 [英] Windows Forms Application C# Style

查看:317
本文介绍了Windows窗体应用程序C#风格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个Windows窗体应用程序在Visual Studio 2008(C#)
和我想样式添加到项目。

I am developing a Windows Form Application in Visual Studio 2008 (C#) And I want to add Style to the items.

我一直在调查这件事,但是我的一些想法还没有找到如何做到这一点的例子。 ?难道真的有可能。

I have been investigating a few ideas about it but I have not found an example about how to do it. Is it really possible?

我的应用程序是这样的:

My app looks like:

但我真要在按钮,textboxs和其他项目添加更多的风格我有:

But I really want to add more style in buttons, textboxs and other items I have:

我的老板坚持使用Visual Studio 2008。

My boss insists on using Visual Studio 2008.

推荐答案

要做到这一点无需购买其他任何东西,你可以创建自己的自定义按钮和文本框控件,无论是从头开始或派生的控件从现有的Windows窗体控件,然后重写的OnPaint等看看是什么一直在这里所做的:

To do this without purchasing anything else, you could create your own custom button and text box controls, either from scratch or as controls derived from the existing windows forms controls and then overriding OnPaint etc. Take a look at what's been done here:

http://dotnetrix.co.uk/button.htm

您也可以调查第三方选项

You could also investigate third party options.

或者,使用WPF如果这正如其他人所说的可能性。我会推动WPF!如果有一个现有的WinForms代码库可以随时承载WPF元素的WinForms。参见:

Or, use WPF if that's a possibility as others have said. I'd push for WPF! If there's an existing WinForms Code base you can always host WPF Elements in WinForms. See:

演练:在Windows窗体中承载Windows Presentation Foundation中控制

这篇关于Windows窗体应用程序C#风格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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