<Window.Resources>
<Style x:Key="Style_1" TargetType="{x:Type Button}">
<Setter Property="Background" Value="Green"/>
</Style>
<Style x:Key="Style_2" TargetType="{x:Type Button}">
<Setter Property="Foreground" Value="White"/>
</Style>
<Style x:Key="Style_3" TargetType="{x:Type Button}">
<Setter Property="BorderBrush" Value="Red"/>
</Style>
<Grid x:Name="LayoutRoot">
<Button Content="MultyStyles" Margin="160,136,248,222"/>
现在我想将以上三种样式应用到一个控件中。我可以将两种样式应用于一个控件,如下所示。
<Window.Resources>
<Style x:Key="Style_1" TargetType="{x:Type Button}">
<Setter Property="Background" Value="Green"/>
</Style>
<Style x:Key="Style_2" TargetType="{x:Type Button}" BasedOn="{StaticResource Style_1}">
<Setter Property="Foreground" Value="White"/>
</Style>
<Style x:Key="Style_3" TargetType="{x:Type Button}">
<Setter Property="BorderBrush" Value="Red"/>
</Style>
<Grid x:Name="LayoutRoot">
<Button Content="MultyStyles" Margin="160,136,248,222" Style="{StaticResource Style_2}"/>
</Grid>
但我不知道将两种以上的样式应用于一个控件。我该怎么办?