Current location - Loan Platform Complete Network - Big data management - Wpf loads big data
Wpf loads big data
You can specify the style directly, which is relatively simple. Defines the MouseEnter and MouseLeave events of the buttons in the style. If all buttons are like this, they can be directly defined as styles. If there is a difference, you can specify the x: key of the style, and then the button that applies the style can point to it.

& 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.