我想将渐变属性绑定到按钮。我正在使用下面的代码。我能够绑定样式。你能建议我应该如何绑定 linergradientbrush 属性吗?
<Window.Resources>
<ResourceDictionary>
<LinearGradientBrush x:Key="buttonStyleGradient" EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="White" Offset="0" />
<GradientStop Color="#FFACC3F5" Offset="1" />
</LinearGradientBrush>
<Style x:Key="buttonStyle" TargetType="Button">
<Setter Property="FontFamily" Value="Vrinda"/>
<Setter Property="FontSize" Value="24"/>
<Setter Property="Padding" Value="8,4" />
<Setter Property="Margin" Value="0" />
</Style>
</ResourceDictionary>
</Window.Resources><Button Style="{StaticResource buttonStyle}" >
<Label>Home</Label>
</Button>