Hover over button content

The style is buttonpredefined. Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"Is it possible to change the contents of this buttonwhen the mouse is over it? I just can't add user control to it

+1
source share
1 answer

Add this style to your button.

<Button>
  <Button.Style>
    <Style BasedOn="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" TargetType="Button">
      <Style.Triggers>
        <Trigger Property="Button.IsMouseOver" Value="True">
            <Setter Property="" Value="" />
        </Trigger>
      </Style.Triggers>
    </Style>
 </Button.Style>

Set your property in SetterandValue

Add <Style BasedOn="Give your default Style here">to save your predefined style.

+2
source

Source: https://habr.com/ru/post/1606854/


All Articles