This documentation is archived and is not being maintained.

EventSetter.Handler Property

Gets or sets the reference to a handler for a routed event in the setter.

Namespace:  System.Windows
Assembly:  PresentationFramework (in PresentationFramework.dll)

public Delegate Handler { get; set; }
For XAML information, see the Delegate type.

Property Value

Type: System.Delegate
Reference to the handler that is attached by this EventSetter.

The following example sets the Handler property as part of a EventSetter in a markup style.

    <Style TargetType="{x:Type Button}">
      <EventSetter Event="Click" Handler="b1SetColor"/>
  <Button>Click me</Button>
  <Button Name="ThisButton" Click="HandleThis">
    Raise event, handle it, use handled=true handler to get it anyway.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0