我有这个代码
<HyperlinkButton Style="{StaticResource HyperLink-Navi-Container}">
<HyperlinkButton.Content>
<TextBlock Text="Sample Text"></TextBlock>
</HyperlinkButton.Content>
</HyperlinkButton>
和这种风格
<Style x:Key="HyperLink-Navi-Container" TargetType="HyperlinkButton">
<Setter Property="Height" Value="50"></Setter>
<Setter Property="Background">
<Setter.Value>
<LinearGradientBrush StartPoint="1, 0.5" EndPoint="1, 2">
<GradientStop Color="White" Offset="0.75"></GradientStop>
<GradientStop Color="Gray"></GradientStop>
</LinearGradientBrush>
</Setter.Value>
</Setter>
<Setter Property="Margin" Value="2,2,2,0"></Setter>
<Setter Property="Foreground" Value="Orange"></Setter>
</Style>
现在我的问题是如何设置TextBlock的属性或HyperlinkBut ton内的任何其他元素的样式,就像在 CSS 中一样
HyperlinkButton.*
{
Background : red;
}
TIA