An attached property is intended to be used as a type of global property that is settable on any object.
BackgroundSwitchElement Contains
Property | Description |
MouseHoverBackground | Gets or sets the background color of the Controls. |
MouseDownBackground | Gets or sets the background color of the Controls. |
First add HandyControl NameSpace
xmlns:hc="https://handyorg.github.io/handycontrol"
Now
<Button hc:BackgroundSwitchElement.MouseHoverBackground="Red"/>
BackgroundSwitchElement.SetMouseHoverBackground(control, Brushes.Red);
BackgroundSwitchElement.SetMouseDownBackground(control, Brushes.Red);
BackgroundSwitchElement.GetMouseHoverBackground(control);
BackgroundSwitchElement.GetMouseDownBackground(control);