IInputElement IInputElement IInputElement IInputElement Interface

Definition

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

public interface class IInputElement
public interface IInputElement
type IInputElement = interface
Public Interface IInputElement
Derived

Remarks

Important

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.

Properties

Focusable Focusable Focusable Focusable

Gets or sets a value that indicates whether focus can be set to this element.

IsEnabled IsEnabled IsEnabled IsEnabled

Gets a value that indicates whether this element is enabled in the user interface (UI).

IsKeyboardFocused IsKeyboardFocused IsKeyboardFocused IsKeyboardFocused

Gets a value that indicates whether this element has keyboard focus.

IsKeyboardFocusWithin IsKeyboardFocusWithin IsKeyboardFocusWithin IsKeyboardFocusWithin

Gets 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.

IsMouseCaptured IsMouseCaptured IsMouseCaptured IsMouseCaptured

Gets a value that indicates whether the mouse is captured to this element.

IsMouseDirectlyOver IsMouseDirectlyOver IsMouseDirectlyOver IsMouseDirectlyOver

Gets a value that indicates whether the mouse pointer is over this element in the strictest hit testing sense.

IsMouseOver IsMouseOver IsMouseOver IsMouseOver

Gets a value that indicates whether the mouse pointer is located over this element (including visual children elements that are inside its bounds).

IsStylusCaptured IsStylusCaptured IsStylusCaptured IsStylusCaptured

Gets a value that indicates whether the stylus is captured to this element.

IsStylusDirectlyOver IsStylusDirectlyOver IsStylusDirectlyOver IsStylusDirectlyOver

Gets a value that indicates whether the stylus is over this element in the strictest hit testing sense.

IsStylusOver IsStylusOver IsStylusOver IsStylusOver

Gets a value that indicates whether the stylus is located over this element (or over visual child elements that are inside its bounds).

Methods

AddHandler(RoutedEvent, Delegate) AddHandler(RoutedEvent, Delegate) AddHandler(RoutedEvent, Delegate) AddHandler(RoutedEvent, Delegate)

Adds a routed event handler for a specific routed event to an element.

CaptureMouse() CaptureMouse() CaptureMouse() CaptureMouse()

Attempts to force capture of the mouse to this element.

CaptureStylus() CaptureStylus() CaptureStylus() CaptureStylus()

Attempts to force capture of the stylus to this element.

Focus() Focus() Focus() Focus()

Attempts to focus the keyboard on this element.

RaiseEvent(RoutedEventArgs) RaiseEvent(RoutedEventArgs) RaiseEvent(RoutedEventArgs) RaiseEvent(RoutedEventArgs)

Raises the routed event that is specified by the RoutedEvent property within the provided RoutedEventArgs.

ReleaseMouseCapture() ReleaseMouseCapture() ReleaseMouseCapture() ReleaseMouseCapture()

Releases the mouse capture, if this element holds the capture.

ReleaseStylusCapture() ReleaseStylusCapture() ReleaseStylusCapture() ReleaseStylusCapture()

Releases the stylus capture, if this element holds the capture.

RemoveHandler(RoutedEvent, Delegate) RemoveHandler(RoutedEvent, Delegate) RemoveHandler(RoutedEvent, Delegate) RemoveHandler(RoutedEvent, Delegate)

Removes all instances of the specified routed event handler from this element.

Events

GotKeyboardFocus GotKeyboardFocus GotKeyboardFocus GotKeyboardFocus

Occurs when the keyboard is focused on this element.

GotMouseCapture GotMouseCapture GotMouseCapture GotMouseCapture

Occurs when the element captures the mouse.

GotStylusCapture GotStylusCapture GotStylusCapture GotStylusCapture

Occurs when the element captures the stylus.

KeyDown KeyDown KeyDown KeyDown

Occurs when a key is pressed while the keyboard is focused on this element.

KeyUp KeyUp KeyUp KeyUp

Occurs when a key is released while the keyboard is focused on this element.

LostKeyboardFocus LostKeyboardFocus LostKeyboardFocus LostKeyboardFocus

Occurs when the keyboard is no longer focused on this element.

LostMouseCapture LostMouseCapture LostMouseCapture LostMouseCapture

Occurs when this element loses mouse capture.

LostStylusCapture LostStylusCapture LostStylusCapture LostStylusCapture

Occurs when this element loses stylus capture.

MouseEnter MouseEnter MouseEnter MouseEnter

Occurs when the mouse pointer enters the bounds of this element.

MouseLeave MouseLeave MouseLeave MouseLeave

Occurs when the mouse pointer leaves the bounds of this element.

MouseLeftButtonDown MouseLeftButtonDown MouseLeftButtonDown MouseLeftButtonDown

Occurs when the left mouse button is pressed while the mouse pointer is over the element.

MouseLeftButtonUp MouseLeftButtonUp MouseLeftButtonUp MouseLeftButtonUp

Occurs when the left mouse button is released while the mouse pointer is over the element.

MouseMove MouseMove MouseMove MouseMove

Occurs when the mouse pointer moves while the mouse pointer is over the element.

MouseRightButtonDown MouseRightButtonDown MouseRightButtonDown MouseRightButtonDown

Occurs when the right mouse button is pressed while the mouse pointer is over the element.

MouseRightButtonUp MouseRightButtonUp MouseRightButtonUp MouseRightButtonUp

Occurs when the right mouse button is released while the mouse pointer is over the element.

MouseWheel MouseWheel MouseWheel MouseWheel

Occurs when the mouse wheel moves while the mouse pointer is over this element.

PreviewGotKeyboardFocus PreviewGotKeyboardFocus PreviewGotKeyboardFocus PreviewGotKeyboardFocus

Occurs when the keyboard is focused on this element.

PreviewKeyDown PreviewKeyDown PreviewKeyDown PreviewKeyDown

Occurs when a key is pressed while the keyboard is focused on this element.

PreviewKeyUp PreviewKeyUp PreviewKeyUp PreviewKeyUp

Occurs when a key is released while the keyboard is focused on this element.

PreviewLostKeyboardFocus PreviewLostKeyboardFocus PreviewLostKeyboardFocus PreviewLostKeyboardFocus

Occurs when the keyboard is no longer focused on this element.

PreviewMouseLeftButtonDown PreviewMouseLeftButtonDown PreviewMouseLeftButtonDown PreviewMouseLeftButtonDown

Occurs when the left mouse button is pressed while the mouse pointer is over the element.

PreviewMouseLeftButtonUp PreviewMouseLeftButtonUp PreviewMouseLeftButtonUp PreviewMouseLeftButtonUp

Occurs when the left mouse button is released while the mouse pointer is over the element.

PreviewMouseMove PreviewMouseMove PreviewMouseMove PreviewMouseMove

Occurs when the mouse pointer moves while the mouse pointer is over the element.

PreviewMouseRightButtonDown PreviewMouseRightButtonDown PreviewMouseRightButtonDown PreviewMouseRightButtonDown

Occurs when the right mouse button is pressed while the mouse pointer is over the element.

PreviewMouseRightButtonUp PreviewMouseRightButtonUp PreviewMouseRightButtonUp PreviewMouseRightButtonUp

Occurs when the right mouse button is released while the mouse pointer is over the element.

PreviewMouseWheel PreviewMouseWheel PreviewMouseWheel PreviewMouseWheel

Occurs when the mouse wheel moves while the mouse pointer is over this element.

PreviewStylusButtonDown PreviewStylusButtonDown PreviewStylusButtonDown PreviewStylusButtonDown

Occurs when the stylus button is pressed down while the stylus is over this element.

PreviewStylusButtonUp PreviewStylusButtonUp PreviewStylusButtonUp PreviewStylusButtonUp

Occurs when the stylus button is released while the stylus is over this element.

PreviewStylusDown PreviewStylusDown PreviewStylusDown PreviewStylusDown

Occurs when the stylus touches the digitizer while over this element.

PreviewStylusInAirMove PreviewStylusInAirMove PreviewStylusInAirMove PreviewStylusInAirMove

Occurs when the stylus moves over an element, but without touching the digitizer.

PreviewStylusInRange PreviewStylusInRange PreviewStylusInRange PreviewStylusInRange

Occurs when the stylus is close enough to the digitizer to be detected.

PreviewStylusMove PreviewStylusMove PreviewStylusMove PreviewStylusMove

Occurs when the stylus moves while the stylus is over the element.

PreviewStylusOutOfRange PreviewStylusOutOfRange PreviewStylusOutOfRange PreviewStylusOutOfRange

Occurs when the stylus is too far from the digitizer to be detected.

PreviewStylusSystemGesture PreviewStylusSystemGesture PreviewStylusSystemGesture PreviewStylusSystemGesture

Occurs when one of several stylus gestures are detected, for example, Tap or Drag.

PreviewStylusUp PreviewStylusUp PreviewStylusUp PreviewStylusUp

Occurs when the stylus is raised off the digitizer while over this element.

PreviewTextInput PreviewTextInput PreviewTextInput PreviewTextInput

Occurs when this element gets text in a device-independent manner.

StylusButtonDown StylusButtonDown StylusButtonDown StylusButtonDown

Occurs when the stylus button is pressed while the stylus is over this element.

StylusButtonUp StylusButtonUp StylusButtonUp StylusButtonUp

Occurs when the stylus button is released while the stylus is over this element.

StylusDown StylusDown StylusDown StylusDown

Occurs when the stylus touches the digitizer while over this element.

StylusEnter StylusEnter StylusEnter StylusEnter

Occurs when the stylus cursor enters the bounds of the element.

StylusInAirMove StylusInAirMove StylusInAirMove StylusInAirMove

Occurs when the stylus moves over an element, but without touching the digitizer.

StylusInRange StylusInRange StylusInRange StylusInRange

Occurs when the stylus is close enough to the digitizer to be detected.

StylusLeave StylusLeave StylusLeave StylusLeave

Occurs when the stylus cursor leaves the bounds of the element.

StylusMove StylusMove StylusMove StylusMove

Occurs when the stylus cursor moves over the element.

StylusOutOfRange StylusOutOfRange StylusOutOfRange StylusOutOfRange

Occurs when the stylus is too far from the digitizer to be detected.

StylusSystemGesture StylusSystemGesture StylusSystemGesture StylusSystemGesture

Occurs when one of several stylus gestures are detected, for example, Tap or Drag.

StylusUp StylusUp StylusUp StylusUp

Occurs when the stylus is raised off the digitizer while over this element.

TextInput TextInput TextInput TextInput

Occurs when this element gets text in a device-independent manner.

Applies to

See Also