& lt! -First, apply to all buttons->
& ltstyle target Type = " { x:Type Button } " & gt; Styles and triggers to define
& lt! -second, define an x: key- >
& ltstyle x:key = " custom Button " Target = " { x:Type Button } " & gt; Styles and triggers to define
Apply the second code to the button as follows:
& ltbutton Style = " { static resource custom button } " & gt;
The above is defined directly in xaml, and can also be called in the background code. I hope it helps you. If you have any questions, please ask or Hi.