IInputElement Interface

Establishes the common events and also the event-related properties and methods for basic input processing by Windows Presentation Foundation (WPF) elements.

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

public interface class IInputElement

The IInputElement type exposes the following members.

  NameDescription
Public propertyFocusableGets or sets a value that indicates whether focus can be set to this element.
Public propertyIsEnabledGets a value that indicates whether this element is enabled in the user interface (UI).
Public propertyIsKeyboardFocusedGets a value that indicates whether this element has keyboard focus.
Public propertyIsKeyboardFocusWithinGets a value that indicates whether keyboard focus is anywhere inside the element bounds, including if keyboard focus is inside the bounds of any visual child elements.
Public propertyIsMouseCapturedGets a value that indicates whether the mouse is captured to this element.
Public propertyIsMouseDirectlyOverGets a value that indicates whether the mouse pointer is over this element in the strictest hit testing sense.
Public propertyIsMouseOverGets a value that indicates whether the mouse pointer is located over this element (including visual children elements that are inside its bounds).
Public propertyIsStylusCapturedGets a value that indicates whether the stylus is captured to this element.
Public propertyIsStylusDirectlyOverGets a value that indicates whether the stylus is over this element in the strictest hit testing sense.
Public propertyIsStylusOverGets a value that indicates whether the stylus is located over this element (or over visual child elements that are inside its bounds).
Top

  NameDescription
Public methodAddHandlerAdds a routed event handler for a specific routed event to an element.
Public methodCaptureMouseAttempts to force capture of the mouse to this element.
Public methodCaptureStylusAttempts to force capture of the stylus to this element.
Public methodFocusAttempts to focus the keyboard on this element.
Public methodRaiseEventRaises the routed event that is specified by the RoutedEventArgs::RoutedEvent property within the provided RoutedEventArgs.
Public methodReleaseMouseCaptureReleases the mouse capture, if this element holds the capture.
Public methodReleaseStylusCaptureReleases the stylus capture, if this element holds the capture.
Public methodRemoveHandlerRemoves all instances of the specified routed event handler from this element.
Top

  NameDescription
Public eventGotKeyboardFocusOccurs when the keyboard is focused on this element.
Public eventGotMouseCaptureOccurs when the element captures the mouse.
Public eventGotStylusCaptureOccurs when the element captures the stylus.
Public eventKeyDownOccurs when a key is pressed while the keyboard is focused on this element.
Public eventKeyUpOccurs when a key is released while the keyboard is focused on this element.
Public eventLostKeyboardFocusOccurs when the keyboard is no longer focused on this element.
Public eventLostMouseCaptureOccurs when this element loses mouse capture.
Public eventLostStylusCaptureOccurs when this element loses stylus capture.
Public eventMouseEnterOccurs when the mouse pointer enters the bounds of this element.
Public eventMouseLeaveOccurs when the mouse pointer leaves the bounds of this element.
Public eventMouseLeftButtonDownOccurs when the left mouse button is pressed while the mouse pointer is over the element.
Public eventMouseLeftButtonUpOccurs when the left mouse button is released while the mouse pointer is over the element.
Public eventMouseMoveOccurs when the mouse pointer moves while the mouse pointer is over the element.
Public eventMouseRightButtonDownOccurs when the right mouse button is pressed while the mouse pointer is over the element.
Public eventMouseRightButtonUpOccurs when the right mouse button is released while the mouse pointer is over the element.
Public eventMouseWheelOccurs when the mouse wheel moves while the mouse pointer is over this element.
Public eventPreviewGotKeyboardFocusOccurs when the keyboard is focused on this element.
Public eventPreviewKeyDownOccurs when a key is pressed while the keyboard is focused on this element.
Public eventPreviewKeyUpOccurs when a key is released while the keyboard is focused on this element.
Public eventPreviewLostKeyboardFocusOccurs when the keyboard is no longer focused on this element.
Public eventPreviewMouseLeftButtonDownOccurs when the left mouse button is pressed while the mouse pointer is over the element.
Public eventPreviewMouseLeftButtonUpOccurs when the left mouse button is released while the mouse pointer is over the element.
Public eventPreviewMouseMoveOccurs when the mouse pointer moves while the mouse pointer is over the element.
Public eventPreviewMouseRightButtonDownOccurs when the right mouse button is pressed while the mouse pointer is over the element.
Public eventPreviewMouseRightButtonUpOccurs when the right mouse button is released while the mouse pointer is over the element.
Public eventPreviewMouseWheelOccurs when the mouse wheel moves while the mouse pointer is over this element.
Public eventPreviewStylusButtonDownOccurs when the stylus button is pressed down while the stylus is over this element.
Public eventPreviewStylusButtonUpOccurs when the stylus button is released while the stylus is over this element.
Public eventPreviewStylusDownOccurs when the stylus touches the digitizer while over this element.
Public eventPreviewStylusInAirMoveOccurs when the stylus moves over an element, but without touching the digitizer.
Public eventPreviewStylusInRangeOccurs when the stylus is close enough to the digitizer to be detected.
Public eventPreviewStylusMoveOccurs when the stylus moves while the stylus is over the element.
Public eventPreviewStylusOutOfRangeOccurs when the stylus is too far from the digitizer to be detected.
Public eventPreviewStylusSystemGestureOccurs when one of several stylus gestures are detected, for example, Tap or Drag.
Public eventPreviewStylusUpOccurs when the stylus is raised off the digitizer while over this element.
Public eventPreviewTextInputOccurs when this element gets text in a device-independent manner.
Public eventStylusButtonDownOccurs when the stylus button is pressed while the stylus is over this element.
Public eventStylusButtonUpOccurs when the stylus button is released while the stylus is over this element.
Public eventStylusDownOccurs when the stylus touches the digitizer while over this element.
Public eventStylusEnterOccurs when the stylus cursor enters the bounds of the element.
Public eventStylusInAirMoveOccurs when the stylus moves over an element, but without touching the digitizer.
Public eventStylusInRangeOccurs when the stylus is close enough to the digitizer to be detected.
Public eventStylusLeaveOccurs when the stylus cursor leaves the bounds of the element.
Public eventStylusMoveOccurs when the stylus cursor moves over the element.
Public eventStylusOutOfRangeOccurs when the stylus is too far from the digitizer to be detected.
Public eventStylusSystemGestureOccurs when one of several stylus gestures are detected, for example, Tap or Drag.
Public eventStylusUpOccurs when the stylus is raised off the digitizer while over this element.
Public eventTextInputOccurs when this element gets text in a device-independent manner.
Top

Important noteImportant

Although this interface is public, it is not intended to be implemented in application or framework-building scenarios. This interface is public because of the inheritance requirements for connecting the WPF core to the WPF framework. You can also use this interface as a casting mechanism to enforce that the input events and properties will come from either a FrameworkElement or FrameworkContentElement, which can be handled in the same input model. For more information, see WPF Architecture and also see Base Elements Overview.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft