WPF 中的 OverridesDefaultStyle [英] OverridesDefaultStyle in WPF

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

问题描述

谁能解释OverridesDefaultStyle 对控件的实际作用?我看过MSDN,但不是很清楚.

Can any one explain what OverridesDefaultStyle actually does to a control? I have read MSDN, but it is not clear.

推荐答案

用于忽略控件的默认样式.默认情况下,如果您在 UI 中放置控件,则所有未在本地设置(显式设置或使用自定义样式)的属性将从默认样式中获取其值.如果您将 OverridesDefaultStyle 设置为 true,则不会使用默认样式

It is used to ignore the default style of a control. By default, if you put a control in your UI, all the properties that are not set locally (explicitly or with a custom style) will take their value from the default style. If you set OverridesDefaultStyle to true, the default style won't be used

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

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