<Setter Property="Background" Value="#FF2DFF53"/>
<Setter Property="Foreground" Value="White"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#FF1CAE37"/>
</Trigger>
</Style.Triggers>
</Style>
почему не изменяется фон кнопки при наведении?
<Style x:Key="StartButton" TargetType="Button" > <Setter Property="Background" Value="#FF2DFF53"/> <Setter Property="Foreground" Value="White"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type Button}"> <Border Background="{TemplateBinding Background}"> <ContentPresenter Content="{TemplateBinding Content}"/> </Border> </ControlTemplate> </Setter.Value> </Setter> <Style.Triggers> <Trigger Property="IsMouseOver" Value="True"> <Setter Property="Background" Value="#FF1CAE37"/> </Trigger> </Style.Triggers> </Style>
а зачем нужен template?
Обсуждают сегодня