WPF - Styles can assign global EventHandlers to a control type

Always wanted to assign a specific EventHandler to all controls of one type?

It's very easy now. Styles offer EventSetter allowing you to assign EventHandlers to a specific Control or a Type of controls.

<Style TargetType="{x:Type Button}">
<EventSetter Event="MouseDoubleClick" Handler="DoSomething" />


Popular posts from this blog

Custom Chrome in WPF

Capture WebCam with WinForms2

WPF: Binding updates