Condividi tramite


DragEventArgs.Handled Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets or sets a value that indicates the present state of the event handling for a routed event as it travels the route.

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

Syntax

'Declaration
Public Property Handled As Boolean
public bool Handled { get; set; }

Property Value

Type: System.Boolean
true if the event is marked handled; otherwise, false. The default value is false.

Remarks

The Handled property is typically set to a value of true as part of a specific handler implementation that handles one of the following events:

If you read this value from event data, true indicates that a handler along the event route has already marked this event as handled. A value of false indicates that no handler has marked the event as handled. However, the value should not typically be true for reading purposes. Handlers that are attached for an already handled event are not invoked by routing through the Silverlight event system and therefore, cannot transmit event data to handlers.

Events that use DragEventArgs event data cannot have handlers attached that are invoked even when another handler marks Handled as true. This is because AddHandler requires a RoutedEvent identifier, and the events that use DragEventArgs do not expose such an identifier. For more information about the Handled concept and about routed events in general, see Events Overview for Silverlight.

Version Information

Silverlight

Supported in: 5, 4

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.