有一个边框,我想同时更改它的边框颜色和背景颜色。 所以,我定义了一个风格波纹管wpf风格,如何将边框的borderbrush引用到背景
<Style x:Key="EoE" TargetType="{x:Type Border}">
<Setter Property="BorderBrush" Value="{StaticResource LightGreen}"/>
<Setter Property="Background">
<Setter.Value>
<SolidColorBrush Color="{Binding Path=BorderBrush }" Opacity="1"/>
</Setter.Value>
</Setter>
<Setter Property="Effect">
<Setter.Value>
<DropShadowEffect ShadowDepth="0" Color="White" Opacity="0.5" BlurRadius="10"/>
<!--<BlurEffect Radius="3" RenderingBias="Quality"/>-->
</Setter.Value>
</Setter>
<Setter Property="BorderThickness" Value="2"></Setter>
我想在运行时改变什么borderbrush,然后我想在同一时间背景的SolidColorBrush变化。
是的,我想要一个不透明度 –