开发者

WPF TemplateBinding on attached properties

开发者 https://www.devze.com 2023-04-06 02:03 出处:网络
I would lik开发者_StackOverflow中文版e to understand this kind of TemplateBinding use: Background=\"{TemplateBinding Panel.Background}\"

I would lik开发者_StackOverflow中文版e to understand this kind of TemplateBinding use:

Background="{TemplateBinding Panel.Background}" 

This is used line inside of the definition of a ControlTemplate redefining the look&Feel of an expander. (The ControlTemplate TargetType=Expander)

As the expander class does not have a Panel Property, I would like to understand where the Panel.Background will come from when the control template will be applied. I thought of an attached property, but in XAML I cannot write something like:

<Expander Panel.Background ="..." />

Hence the expander class does not seem to have the Panel.Background attached property.

0

精彩评论

暂无评论...
验证码 换一张
取 消