Represents an event setter in a style. Event setters invoke the specified event handlers in response to events.
Assembly: PresentationFramework (in PresentationFramework.dll)
Gets or sets the particular routed event that thisresponds to.
Gets or sets a value that determines whether the handler assigned to the setter should still be invoked, even if the event is marked handled in its event data.
Gets or sets the reference to a handler for a routed event in the setter.
Gets a value that indicates whether this object is in an immutable state.(Inherited from SetterBase.)
Checks whether this object is read-only and cannot be changed.(Inherited from SetterBase.)
Determines whether the specified object is equal to the current object.(Inherited from Object.)
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)
Serves as the default hash function. (Inherited from Object.)
Returns a string that represents the current object.(Inherited from Object.)
Event setters invoke the specified event handlers in response to routed events, which apply to all elements that reference the Style rather than requiring you to attach instance handlers to each individual element. Only Style.Setters support objects.
You can only declare event setters for events that are routed events. You can declare event setters for routed events with a direct routing strategy, bubbling events, or tunneling events.
Instances of theclass are usually created through Extensible Application Markup Language (XAML), as an object element within a style defined through XAML. An might also be instantiated from code.
Event setters cannot be used in a style that is contained in a theme resource dictionary. This is because a theme resource dictionary at run time is often loose binary XAML (BAML) files, and does not have any scope defined where accompanying code-behind that defines the handlers can exist.
Handlers attached through event setters are invoked after any class handlers for an event, and also after any instance handlers. As a result, if a class handler or instance handler marks an event handled in its arguments, then the handler declared by an event setter is not invoked, unless the event setter specifically sets HandledEventsToo true.
Available since 3.0
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.