在表单中使用常见样式 [英] Using common styles across forms

查看:72
本文介绍了在表单中使用常见样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我有一个Windows窗体应用程序。该项目包含许多获胜形式。许多按钮,文本框等都在表单中使用。我需要为所有winforms中的按钮定义通用样式。目前
我为每个按钮定义相同的样式。在winforms中是否有类似CSS的东西,我在一个地方为我的控件定义了所有样式。并且只更改一次并反映在所有地方。


提前致谢。非常感谢您的帮助。







Sunil

解决方案

WPF比win表格容易得多。 如果您没有在Win Forms中投入大量代码,请考虑进行切换。



或者,您可能会觉得这很有趣:
http://www.codeproject.com/Articles / 14814 / StylesSheetManager-A-CSS-like-component-for-WinFor


第三方UI组件供应商通常采用蒙皮方法。示例:


http://www.telerik.com /products/winforms/visual-style-builder.aspx


Hi,

I have a windows forms application. The project contains lot of win forms. And lot of buttons, textboxes so on are used inside forms. I need to define common style for buttons in all of my winforms. Currently I'm defining for each and every button same styles. Is there something like CSS equivalent in winforms, where I define all the styles for my controls in single place. and change them only once and reflect in all places.

Thanks in advance. Your help is greatly appreciated.



Sunil

解决方案

This is a lot easier in WPF than win forms.  If you don't have a ton of code already invested in Win Forms, consider making the switch.

Alternatively, you might find this interesting: http://www.codeproject.com/Articles/14814/StylesSheetManager-A-CSS-like-component-for-WinFor

Third-party UI component vendors often have approaches to skinning. Example:

http://www.telerik.com/products/winforms/visual-style-builder.aspx


这篇关于在表单中使用常见样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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