WPF窗口的默认样式 [英] Default Style to WPF Window

查看:68
本文介绍了WPF窗口的默认样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用客户控制"和样式"为WPF窗口创建了样式,知道我想为WPF窗口的默认样式提供一个选项.
http://www.codeproject.com/KB/WPF/CustomFrames.aspx

请参考此页面,它们是两个自定义窗口,我想再添加一个默认的WPF窗口样式

在该演示中,他们是一个组合框,我们必须更改该自定义窗口的样式,我想再添加一个默认的WPF样式.如何给WPF默认样式.

I have Created style to the WPF Window using Customer Control and Style know i want to give a option to default style to the WPF window how it is possible.

http://www.codeproject.com/KB/WPF/CustomFrames.aspx

Please refer this page , their is two custom window i want to add one more that is default WPF Window style

In that demo their is a Combobox we have to change style of that custom window ,i want to add one more that is default WPF style.How can i give the WPF default style.

推荐答案

您的问题有点令人困惑.我想这就是你想要的:

-您已经定义了一种控件类型的样式作为字典资源
-您想显示一个默认样式的此类型的控件
-您想显示与您的新样式相同类型的另一个控件

在这种情况下,您必须在字典中的样式中提供一个键名称,然后将样式显式地应用到要非默认的控件上.
Your question is a bit confusing. I would assume this is what you want:

- you have defined a style for a type of control as a dictionary resource
- you want to show one control of this type with the default style
- you want to show another control of the same type with your new style

If this is the case, you have to provide a Key name to the style in the dictionary, then apply the style explicity to the controls you want to be non-default.


这篇关于WPF窗口的默认样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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