Skip to content

How can I prevent the button from getting smaller when pressed? #16100

Answered by stevemonaco
Irasil asked this question in Q&A
Discussion options

You must be logged in to vote

First, you always need to read the original ControlTheme. For Fluent, the relevant bit is here:

<Style Selector="^:pressed">
<Setter Property="RenderTransform" Value="scale(0.98)" />
</Style>

In this instance, you can easily replace this with a new selector:

<Style Selector="Button:pressed">
  <Setter Property="RenderTransform" Value="{x:Null}" />
</Style>

You could also set Value="scale(1)", but no transform should be more efficient.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Irasil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants