各位园友:
随便拽一个button进工程里,想实现button 在IsMouseOver的时候,底色不变,请问如何搞,我在属性触发器里添加了相应的代码,设置Background为透明,但是button上面还是罩了一层颜色。请园友解惑:
样式代码:
<Style x:Key="BtnExample" TargetType="Button"> <Setter Property="Background"> <Setter.Value> <ImageBrush ImageSource="/EnvrimentConfig;component/Images/get.ico" /> </Setter.Value> </Setter> <Style.Triggers> <Trigger Property="Button.IsMouseOver" Value="True"> <Setter Property="Button.Background" Value="Transparent" > </Setter> </Trigger> </Style.Triggers> </Style>
XAML下代码:
<Button Height="96" Style="{StaticResource BtnExample}" HorizontalAlignment="Left" Margin="170,12,0,0" Name="button3" VerticalAlignment="Top" Width="90" Grid.RowSpan="2">
HUX布斯
富国沪深
HUWWW
红糖糍粑
慕工程0101907