如何在wpf中创建类似文件的CSS [英] how to create css like file in wpf

查看:103
本文介绍了如何在wpf中创建类似文件的CSS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好



我是WPF的新手。我想创建一个文件,我将对所有表单控件的高度,宽度和其他属性的代码进行调整并且只会将该文件用于每个页面..所以手动我不需要更改它们..



请告诉我该怎么做



谢谢你

Hi all

I am new to WPF..I want to create a file where i will right the code for all form controls height, width and other property and will only use that file into every page..so that manually i don''t have to change them..

Please tell me how to do that

Thank you

推荐答案

你可以通过将所有样式和模板存储在一个中心文件中来轻松完成你可以调用资源字典。

例如在WPF中使用资源字典 [ ^ ]

http: //blogs.msdn.com/b/wpfsldesigner/archive/2010/06/03/creating-and-consuming-resource-dictionaries-in-wpf-and-silverlight.aspx [ ^ ]

http:// www.c-sharpcorner.com/uploadfile/raj1979/resourcedictionary-in-wpf/ [ ^ ]
You can do this quite easily by storing all your styles and templates in a central file that you can call the resource dictionary.
E.g. Using a Resource Dictionary in WPF[^]
http://blogs.msdn.com/b/wpfsldesigner/archive/2010/06/03/creating-and-consuming-resource-dictionaries-in-wpf-and-silverlight.aspx[^]
http://www.c-sharpcorner.com/uploadfile/raj1979/resourcedictionary-in-wpf/[^]


这篇关于如何在wpf中创建类似文件的CSS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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