Called before the ManipulationStarting event occurs.
protected: virtual void OnManipulationStarting( ManipulationStartingRoutedEventArgs^ e )
Event data for the event.
OnManipulationStarting represents a prewired event handler for the UIElement.ManipulationStarting event. Practical controls that derive from Control can override the OnManipulationStarting method and use this to provide control-specific handling and behavior for that input event. The most common scenario is to use the event handler to mark the event as Handled in the event data. The control code has first chance to handle this event, before any event handlers that are wired on a control instance are invoked. When the event data is marked Handled, then other handlers like those on the control instance won't be called. Also, the event won't bubble. For more info, see the "On* event handler overrides" section in Control.
As it's implemented directly on Control, OnManipulationStarting has an empty implementation. But each ancestor in a control's hierarchy may have provided an implementation. You won't be able to see this implementation because it's internal native code. In some cases a control will already have existing On* overrides that mark the event Handled. Once you've provided an initial On* override for a control, then any controls that you further derive from your own control class would also inherit the On* overrides you define. Any instances you use have that behavior too.
Note App code can still handle events that may have been marked Handled by a control's On* method logic, but they need to use the handledEventsToo parameter for the UIElement.AddHandler method. For more info, see UIElement.AddHandler or Events and routed events overview.
Windows 8 had an issue with firing this event if multiple gestures happened in a short period of time. For example, Windows 8 might only fire ManipulationStarting for the first gesture and not the second. The issue is fixed starting with Windows 8.1; multiple starting gestures processed by the input system each fire a distinct ManipulationStarting event.
Apps that were compiled for Windows 8 but running on Windows 8.1 continue to use the Windows 8 behavior.
Minimum supported client
Minimum supported server
|Windows Server 2012|
- Events and routed events overview
- Gestures, manipulations, and interactions
- Quickstart: Pointers