<. ! -- the first, apply to all buttons -- >
<Style TargetType="{x:Type Button}"> the style and trigger you want to define </Style>
<! -- the second one, define an x:key -->
<Style x:key="CustomButton" Target="{x:Type Button}"> the style and trigger you want to define</Style>
Applying the second one on the button, the code looks like this :
<Button Style="{StaticResource CustomButton}">
The above is the practice of defining directly in the xaml, you can also call in the background code, I hope it will help you, if you have any questions, please follow up or Hi