UIElement.PointerPressed event

Expand
0 out of 3 rated this helpful - Rate this topic

UIElement.PointerPressed event

[This documentation is preliminary and is subject to change.]

Occurs when the pointer device initiates a Press action within this element.

Syntax


public event PointerEventHandler PointerPressed


<uiElement PointerPressed="eventhandler"/>

Event information

Delegate PointerEventHandler

Remarks

Note  Other events instead of PointerReleased may fire at the end of the action—for example, PointerCanceled or PointerCaptureLost. Don't rely on PointerPressed and PointerReleased events always occurring in pairs. To function properly, your app must listen for and handle all events that represent likely conclusions to the Press action. Some of the reasons why you might not get a PointerReleased occurrence are:
  • Differences in how specific hardware handles touch actions and Press actions
  • A programmatic pointer capture from a different pointer
  • User actions that change the relationship of the display area, such as changing resolution or monitor settings
  • Input interactions such as a stylus touching the same surface as a previous touch action

This event is a routed event. For more info on the routed event concept, see Events and routed events overview.

For touch actions and also for interaction-specific or manipulation events that are consequences of a touch action, an element must be hit-test visible in order to be the event source and fire the event that is associated with the action. UIElement.Visibility must be Visible. Other properties of derived types also affect hit-test visibility. For more info, see Hit testing and input events.

This event also supports the ability to attach event handlers to the route that will be invoked even if the event data for the event is marked Handled. See AddHandler.

Specific Windows Runtime controls may have class-based handling for the PointerPressed input event. If so, the control probably has an override for the method OnPointerPressed. Typically the event is marked handled by the class handler, and the PointerPressed event is not raised for handling by any user code handlers on that control. For more info on how class-based handling for events works, see Input event handlers in controls.

Requirements

Minimum supported client

Windows 8 Release Preview

Minimum supported server

Windows Server 2012

Namespace

Windows.UI.Xaml
Windows::UI::Xaml [C++]

Metadata

Windows.winmd

See also

UIElement
Tapped
PointerReleased
Quickstart: touch input
XAML user input events sample

 

 

Build date: 5/22/2012

Did you find this helpful?
(1500 characters remaining)
Community Additions ADD