The latest build of this product (v25.1.1) was released 18 days ago, which was before this thread was created.
Posted 11 days ago by BenjaminLopVic - France
Version: 25.1.1
Avatar

Hello,

I'm trying to override the background of a button when the mouse is over, but I can't get it to work.
I've tried several approaches, such as:

<Style TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
    <Style.Triggers>
        <Trigger Property="IsMouseOver" Value="True">
            <Setter Property="Background" Value="Red"/>
        </Trigger>
    </Style.Triggers>
</Style>

Thanks,

Benjamin.

Comments (1)

Answer - Posted 10 days ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

If you are using our themes for native WPF controls, then the above via a Style.Trigger won't work because we adjust the brushes within the Button's Template.  You could override the brush resource AssetResourceKeys.ButtonBackgroundHoverBrushKey if you'd like a different value.

This documentation topic describes how to override brush resources.


Actipro Software Support

Add Comment

Please log in to a validated account to post comments.