2021年1月1日星期五

WPF, My IsMouseOver of my Grid doesnt change the Backgroundcolor

<Grid x:Name="set_bg" DockPanel.Dock="Top" Height="90" Background="Transparent" MouseDown="set_bg_MouseDown">      <Grid.Style>          <Style TargetType="{x:Type Grid}">              <Style.Triggers>                  <Trigger Property="IsMouseOver" Value="True">                      <Setter Property="Background" Value="DarkGoldenrod"/>                  </Trigger>              </Style.Triggers>          </Style>      </Grid.Style>      <Image Height="66" Opacity="0.7" Source="/Images/settings.png" RenderOptions.BitmapScalingMode="HighQuality"/>  </Grid>  

I don't really know why this doesn't work, even though everything should be fine

https://stackoverflow.com/questions/65533879/wpf-my-ismouseover-of-my-grid-doesnt-change-the-backgroundcolor January 02, 2021 at 05:31AM

没有评论:

发表评论