Skip to content

Latest commit

 

History

History
37 lines (32 loc) · 900 Bytes

BackgroundSwitchElement-Attach.md

File metadata and controls

37 lines (32 loc) · 900 Bytes

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.

Usage in Xaml

First add HandyControl NameSpace

xmlns:hc="https://handyorg.github.io/handycontrol"

Now

<Button hc:BackgroundSwitchElement.MouseHoverBackground="Red"/>

Usage in Code-Behind

BackgroundSwitchElement.SetMouseHoverBackground(control, Brushes.Red);
BackgroundSwitchElement.SetMouseDownBackground(control, Brushes.Red);

BackgroundSwitchElement.GetMouseHoverBackground(control);
BackgroundSwitchElement.GetMouseDownBackground(control);