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" />
</Style>

Comments

Popular posts from this blog

WPF: Binding updates

An Icq Client built on .NET?

InstallShield Applications on Vista 5270