【发布时间】:2013-02-18 06:44:32
【问题描述】:
我是 WPF 新手。我不知道该怎么做。
我已经定义了这种风格 -
<Style TargetType="{x:Type Button}" x:Key="StandardButton">
<Setter Property="Background" Value="{StaticResource LightBackground}"/>
<Setter Property="Foreground" Value="{StaticResource Foreground}"/>
</Style>
我有一个控制模板 -
<ControlTemplate x:Key="ExpanderTemplate" TargetType="{x:Type Expander}">
<ControlTemplate.Resources>
<Style TargetType="{x:Type Button}" /* Here I need to put above defined style */></Style>
</ControlTemplate.Resources>
</ControlTemplate>
【问题讨论】:
标签: c# wpf controltemplates