我已将椭圆绑定到复选框和iValueConverter(此作品 ...填充(见下文))。
<Ellipse Name="ellLeftRoleEnabled"
Fill="{Binding IsChecked, ElementName=btnRollLeftEnabled, Converter={StaticResource myColorConverter}}"
Height="80" Canvas.Left="355" Stroke="#FF0C703E" Canvas.Top="440" Width="80"/>
但是现在,我如何将它用于LinearGradientBrush / GradientStop?
<Ellipse Name="ellLeftRoleMoving" Height="100" Canvas.Left="345" Stroke="Black" Canvas.Top="535" Width="100">
<Ellipse.Fill>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="{?????} Offset="0"/>
<GradientStop Color="White" Offset="1"/>
</LinearGradientBrush>
</Ellipse.Fill>
</Ellipse>
请帮忙。谢谢。