curiousity
curiousity

Reputation: 4741

Change content of the button on mouseover

The style of button is predefined Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" is it possible to change content of such button when the mouse is over it? I just dlike to put a custom control in it

Upvotes: 1

Views: 1491

Answers (1)

Abin
Abin

Reputation: 2956

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 Setter and Value

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

Upvotes: 2

Related Questions