IInputElement Interface

Summary

Defines input-related functionality for a control.
Namespace
Avalonia.Input
Interfaces
Implementing Types
graph BT Type-.->Interface0["IInteractive"] click Interface0 "/api/Avalonia.Interactivity/IInteractive" Type-.->Interface1["IVisual"] click Interface1 "/api/Avalonia.VisualTree/IVisual" Type["IInputElement"] class Type type-node Implementing0["IMenuItem"]-.->Type click Implementing0 "/api/Avalonia.Controls/IMenuItem" Implementing1["IVirtualizingPanel"]-.->Type click Implementing1 "/api/Avalonia.Controls/IVirtualizingPanel" Implementing2["ReactiveWindow<TViewModel>"]-.->Type click Implementing2 "/api/Avalonia.ReactiveUI/ReactiveWindow_1" Implementing3["TreeView"]-.->Type click Implementing3 "/api/Avalonia.Controls/TreeView" Implementing4["Thumb"]-.->Type click Implementing4 "/api/Avalonia.Controls.Primitives/Thumb" Implementing5["Separator"]-.->Type click Implementing5 "/api/Avalonia.Controls/Separator" Implementing6["ComboBox"]-.->Type click Implementing6 "/api/Avalonia.Controls/ComboBox" Implementing7["UserControl"]-.->Type click Implementing7 "/api/Avalonia.Controls/UserControl" Implementing8["Decorator"]-.->Type click Implementing8 "/api/Avalonia.Controls/Decorator" Implementing9["Slider"]-.->Type click Implementing9 "/api/Avalonia.Controls/Slider" Implementing10["ContextMenu"]-.->Type click Implementing10 "/api/Avalonia.Controls/ContextMenu" Implementing11["Ellipse"]-.->Type click Implementing11 "/api/Avalonia.Controls.Shapes/Ellipse" Implementing12["OverlayLayer"]-.->Type click Implementing12 "/api/Avalonia.Controls.Primitives/OverlayLayer" Implementing13["RadioButton"]-.->Type click Implementing13 "/api/Avalonia.Controls/RadioButton" Implementing14["Control"]-.->Type click Implementing14 "/api/Avalonia.Controls/Control" Implementing15["ListBox"]-.->Type click Implementing15 "/api/Avalonia.Controls/ListBox" Implementing16["SelectingItemsControl"]-.->Type click Implementing16 "/api/Avalonia.Controls.Primitives/SelectingItemsControl" Implementing17["AdornerLayer"]-.->Type click Implementing17 "/api/Avalonia.Controls.Primitives/AdornerLayer" Implementing18["PopupRoot"]-.->Type click Implementing18 "/api/Avalonia.Controls.Primitives/PopupRoot" Implementing19["ViewModelViewHost"]-.->Type click Implementing19 "/api/Avalonia.ReactiveUI/ViewModelViewHost" Implementing20["IMenuElement"]-.->Type click Implementing20 "/api/Avalonia.Controls/IMenuElement" Implementing21["IInputRoot"]-.->Type click Implementing21 "/api/Avalonia.Input/IInputRoot" Implementing22["HeaderedItemsControl"]-.->Type click Implementing22 "/api/Avalonia.Controls.Primitives/HeaderedItemsControl" Implementing23["MenuItem"]-.->Type click Implementing23 "/api/Avalonia.Controls/MenuItem" Implementing24["InputElement"]-.->Type click Implementing24 "/api/Avalonia.Input/InputElement" Implementing25["ItemsRepeater"]-.->Type click Implementing25 "/api/Avalonia.Controls/ItemsRepeater" Implementing26["ComboBoxItem"]-.->Type click Implementing26 "/api/Avalonia.Controls/ComboBoxItem" Implementing27["WrapPanel"]-.->Type click Implementing27 "/api/Avalonia.Controls/WrapPanel" Implementing28["Viewbox"]-.->Type click Implementing28 "/api/Avalonia.Controls/Viewbox" Implementing29["AutoCompleteBox"]-.->Type click Implementing29 "/api/Avalonia.Controls/AutoCompleteBox" Implementing30["TabControl"]-.->Type click Implementing30 "/api/Avalonia.Controls/TabControl" Implementing31["Menu"]-.->Type click Implementing31 "/api/Avalonia.Controls/Menu" Implementing32["DataGridRowGroupHeader"]-.->Type click Implementing32 "/api/Avalonia.Controls/DataGridRowGroupHeader" Implementing33["StackPanel"]-.->Type click Implementing33 "/api/Avalonia.Controls/StackPanel" Implementing34["TabItem"]-.->Type click Implementing34 "/api/Avalonia.Controls/TabItem" Implementing35["ItemsPresenterBase"]-.->Type click Implementing35 "/api/Avalonia.Controls.Presenters/ItemsPresenterBase" Implementing36["ListBoxItem"]-.->Type click Implementing36 "/api/Avalonia.Controls/ListBoxItem" Implementing37["ScrollViewer"]-.->Type click Implementing37 "/api/Avalonia.Controls/ScrollViewer" Implementing38["CalendarItem"]-.->Type click Implementing38 "/api/Avalonia.Controls.Primitives/CalendarItem" Implementing39["Popup"]-.->Type click Implementing39 "/api/Avalonia.Controls.Primitives/Popup" Implementing40["DevTools"]-.->Type click Implementing40 "/api/Avalonia.Diagnostics/DevTools" Implementing41["DataGridDetailsPresenter"]-.->Type click Implementing41 "/api/Avalonia.Controls.Primitives/DataGridDetailsPresenter" Implementing42["TreeViewItem"]-.->Type click Implementing42 "/api/Avalonia.Controls/TreeViewItem" Implementing43["Shape"]-.->Type click Implementing43 "/api/Avalonia.Controls.Shapes/Shape" Implementing44["DataGridCell"]-.->Type click Implementing44 "/api/Avalonia.Controls/DataGridCell" Implementing45["VisualLayerManager"]-.->Type click Implementing45 "/api/Avalonia.Controls.Primitives/VisualLayerManager" Implementing46["ButtonSpinner"]-.->Type click Implementing46 "/api/Avalonia.Controls/ButtonSpinner" Implementing47["ProgressBar"]-.->Type click Implementing47 "/api/Avalonia.Controls/ProgressBar" Implementing48["RepeatButton"]-.->Type click Implementing48 "/api/Avalonia.Controls/RepeatButton" Implementing49["TransitioningContentControl"]-.->Type click Implementing49 "/api/Avalonia.ReactiveUI/TransitioningContentControl" Implementing50["HeaderedSelectingItemsControl"]-.->Type click Implementing50 "/api/Avalonia.Controls.Primitives/HeaderedSelectingItemsControl" Implementing51["Path"]-.->Type click Implementing51 "/api/Avalonia.Controls.Shapes/Path" Implementing52["IMenu"]-.->Type click Implementing52 "/api/Avalonia.Controls/IMenu" Implementing53["Panel"]-.->Type click Implementing53 "/api/Avalonia.Controls/Panel" Implementing54["AccessText"]-.->Type click Implementing54 "/api/Avalonia.Controls.Primitives/AccessText" Implementing55["ItemsPresenter"]-.->Type click Implementing55 "/api/Avalonia.Controls.Presenters/ItemsPresenter" Implementing56["TabStrip"]-.->Type click Implementing56 "/api/Avalonia.Controls.Primitives/TabStrip" Implementing57["DataGridRow"]-.->Type click Implementing57 "/api/Avalonia.Controls/DataGridRow" Implementing58["UniformGrid"]-.->Type click Implementing58 "/api/Avalonia.Controls.Primitives/UniformGrid" Implementing59["Spinner"]-.->Type click Implementing59 "/api/Avalonia.Controls/Spinner" Implementing60["ReversibleStackPanel"]-.->Type click Implementing60 "/api/Avalonia.Controls/ReversibleStackPanel" Implementing61["DropDown"]-.->Type click Implementing61 "/api/Avalonia.Controls/DropDown" Implementing62["ItemsControl"]-.->Type click Implementing62 "/api/Avalonia.Controls/ItemsControl" Implementing63["Calendar"]-.->Type click Implementing63 "/api/Avalonia.Controls/Calendar" Implementing64["RangeBase"]-.->Type click Implementing64 "/api/Avalonia.Controls.Primitives/RangeBase" Implementing65["DataGridRowsPresenter"]-.->Type click Implementing65 "/api/Avalonia.Controls.Primitives/DataGridRowsPresenter" Implementing66["AutoCompleteBox.BindingEvaluator<T>"]-.->Type click Implementing66 "/api/Avalonia.Controls/BindingEvaluator_1" Implementing67["TabStripItem"]-.->Type click Implementing67 "/api/Avalonia.Controls.Primitives/TabStripItem" Implementing68["GridSplitter"]-.->Type click Implementing68 "/api/Avalonia.Controls/GridSplitter" Implementing69["Polyline"]-.->Type click Implementing69 "/api/Avalonia.Controls.Shapes/Polyline" Implementing70["DataGridFrozenGrid"]-.->Type click Implementing70 "/api/Avalonia.Controls.Primitives/DataGridFrozenGrid" Implementing71["ToolTip"]-.->Type click Implementing71 "/api/Avalonia.Controls/ToolTip" Implementing72["CalendarButton"]-.->Type click Implementing72 "/api/Avalonia.Controls.Primitives/CalendarButton" Implementing73["IContentControl"]-.->Type click Implementing73 "/api/Avalonia.Controls/IContentControl" Implementing74["Rectangle"]-.->Type click Implementing74 "/api/Avalonia.Controls.Shapes/Rectangle" Implementing75["Border"]-.->Type click Implementing75 "/api/Avalonia.Controls/Border" Implementing76["DataGridRowHeader"]-.->Type click Implementing76 "/api/Avalonia.Controls.Primitives/DataGridRowHeader" Implementing77["HeaderedContentControl"]-.->Type click Implementing77 "/api/Avalonia.Controls.Primitives/HeaderedContentControl" Implementing78["NumericUpDown"]-.->Type click Implementing78 "/api/Avalonia.Controls/NumericUpDown" Implementing79["IContentPresenter"]-.->Type click Implementing79 "/api/Avalonia.Controls.Presenters/IContentPresenter" Implementing80["EmbeddableControlRoot"]-.->Type click Implementing80 "/api/Avalonia.Controls.Embedding/EmbeddableControlRoot" Implementing81["Canvas"]-.->Type click Implementing81 "/api/Avalonia.Controls/Canvas" Implementing82["RemoteWidget"]-.->Type click Implementing82 "/api/Avalonia.Controls.Remote/RemoteWidget" Implementing83["Line"]-.->Type click Implementing83 "/api/Avalonia.Controls.Shapes/Line" Implementing84["ContentPresenter"]-.->Type click Implementing84 "/api/Avalonia.Controls.Presenters/ContentPresenter" Implementing85["ScrollContentPresenter"]-.->Type click Implementing85 "/api/Avalonia.Controls.Presenters/ScrollContentPresenter" Implementing86["NativeMenuBar"]-.->Type click Implementing86 "/api/Avalonia.Controls/NativeMenuBar" Implementing87["ReactiveUserControl<TViewModel>"]-.->Type click Implementing87 "/api/Avalonia.ReactiveUI/ReactiveUserControl_1" Implementing88["CheckBox"]-.->Type click Implementing88 "/api/Avalonia.Controls/CheckBox" Implementing89["CalendarDayButton"]-.->Type click Implementing89 "/api/Avalonia.Controls.Primitives/CalendarDayButton" Implementing90["ToggleButton"]-.->Type click Implementing90 "/api/Avalonia.Controls.Primitives/ToggleButton" Implementing91["DockPanel"]-.->Type click Implementing91 "/api/Avalonia.Controls/DockPanel" Implementing92["DataGridColumnHeader"]-.->Type click Implementing92 "/api/Avalonia.Controls/DataGridColumnHeader" Implementing93["Expander"]-.->Type click Implementing93 "/api/Avalonia.Controls/Expander" Implementing94["DatePicker"]-.->Type click Implementing94 "/api/Avalonia.Controls/DatePicker" Implementing95["Track"]-.->Type click Implementing95 "/api/Avalonia.Controls.Primitives/Track" Implementing96["TextBox"]-.->Type click Implementing96 "/api/Avalonia.Controls/TextBox" Implementing97["RoutedViewHost"]-.->Type click Implementing97 "/api/Avalonia.ReactiveUI/RoutedViewHost" Implementing98["Image"]-.->Type click Implementing98 "/api/Avalonia.Controls/Image" Implementing99["VirtualizingStackPanel"]-.->Type click Implementing99 "/api/Avalonia.Controls/VirtualizingStackPanel" Implementing100["IControl"]-.->Type click Implementing100 "/api/Avalonia.Controls/IControl" Implementing101["DrawingPresenter"]-.->Type click Implementing101 "/api/Avalonia.Controls/DrawingPresenter" Implementing102["ContentControl"]-.->Type click Implementing102 "/api/Avalonia.Controls/ContentControl" Implementing103["CarouselPresenter"]-.->Type click Implementing103 "/api/Avalonia.Controls.Presenters/CarouselPresenter" Implementing104["Button"]-.->Type click Implementing104 "/api/Avalonia.Controls/Button" Implementing105["Polygon"]-.->Type click Implementing105 "/api/Avalonia.Controls.Shapes/Polygon" Implementing106["DataGrid"]-.->Type click Implementing106 "/api/Avalonia.Controls/DataGrid" Implementing107["TemplatedControl"]-.->Type click Implementing107 "/api/Avalonia.Controls.Primitives/TemplatedControl" Implementing108["LayoutTransformControl"]-.->Type click Implementing108 "/api/Avalonia.Controls/LayoutTransformControl" Implementing109["DataGridColumnHeadersPresenter"]-.->Type click Implementing109 "/api/Avalonia.Controls.Primitives/DataGridColumnHeadersPresenter" Implementing110["DropDownItem"]-.->Type click Implementing110 "/api/Avalonia.Controls/DropDownItem" Implementing111["WindowNotificationManager"]-.->Type click Implementing111 "/api/Avalonia.Controls.Notifications/WindowNotificationManager" Implementing112["IPanel"]-.->Type click Implementing112 "/api/Avalonia.Controls/IPanel" Implementing113["TextPresenter"]-.->Type click Implementing113 "/api/Avalonia.Controls.Presenters/TextPresenter" Implementing114["ScrollBar"]-.->Type click Implementing114 "/api/Avalonia.Controls.Primitives/ScrollBar" Implementing115["IPresenter"]-.->Type click Implementing115 "/api/Avalonia.Controls.Presenters/IPresenter" Implementing116["DataGridCellsPresenter"]-.->Type click Implementing116 "/api/Avalonia.Controls.Primitives/DataGridCellsPresenter" Implementing117["NotificationCard"]-.->Type click Implementing117 "/api/Avalonia.Controls.Notifications/NotificationCard" Implementing118["Grid"]-.->Type click Implementing118 "/api/Avalonia.Controls/Grid" Implementing119["TextBlock"]-.->Type click Implementing119 "/api/Avalonia.Controls/TextBlock" Implementing120["DataValidationErrors"]-.->Type click Implementing120 "/api/Avalonia.Controls/DataValidationErrors" Implementing121["Window"]-.->Type click Implementing121 "/api/Avalonia.Controls/Window" Implementing122["IItemsPresenter"]-.->Type click Implementing122 "/api/Avalonia.Controls.Presenters/IItemsPresenter" Implementing123["Carousel"]-.->Type click Implementing123 "/api/Avalonia.Controls/Carousel" Implementing124["WindowBase"]-.->Type click Implementing124 "/api/Avalonia.Controls/WindowBase" Implementing125["AboutAvaloniaDialog"]-.->Type click Implementing125 "/api/Avalonia.Dialogs/AboutAvaloniaDialog" Implementing126["OverlayPopupHost"]-.->Type click Implementing126 "/api/Avalonia.Controls.Primitives/OverlayPopupHost" Implementing127["MenuBase"]-.->Type click Implementing127 "/api/Avalonia.Controls/MenuBase" Implementing128["TopLevel"]-.->Type click Implementing128 "/api/Avalonia.Controls/TopLevel"

Syntax

public interface IInputElement : IInteractive, IVisual

Events

Name Type Summary
GotFocus EventHandler<GotFocusEventArgs>
Occurs when the control receives focus.
KeyDown EventHandler<KeyEventArgs>
Occurs when a key is pressed while the control has focus.
KeyUp EventHandler<KeyEventArgs>
Occurs when a key is released while the control has focus.
LostFocus EventHandler<RoutedEventArgs>
Occurs when the control loses focus.
PointerEnter EventHandler<PointerEventArgs>
Occurs when the pointer enters the control.
PointerLeave EventHandler<PointerEventArgs>
Occurs when the pointer leaves the control.
PointerMoved EventHandler<PointerEventArgs>
Occurs when the pointer moves over the control.
PointerPressed EventHandler<PointerPressedEventArgs>
Occurs when the pointer is pressed over the control.
PointerReleased EventHandler<PointerReleasedEventArgs>
Occurs when the pointer is released over the control.
PointerWheelChanged EventHandler<PointerWheelEventArgs>
Occurs when the mouse wheen is scrolled over the control.
TextInput EventHandler<TextInputEventArgs>
Occurs when a user typed some text while the control has focus.

Properties

Name Value Summary
Cursor Cursor
Gets or sets the associated mouse cursor.
Focusable bool
Gets or sets a value indicating whether the control can receive keyboard focus.
IsEffectivelyEnabled bool
Gets a value indicating whether this control and all its parents are enabled.
IsEnabled bool
Gets or sets a value indicating whether the control is enabled for user interaction.
IsFocused bool
Gets a value indicating whether the control is focused.
IsHitTestVisible bool
Gets a value indicating whether the control is considered for hit testing.
IsPointerOver bool
Gets a value indicating whether the pointer is currently over the control.
KeyBindings List<KeyBinding>
Gets the key bindings for the element.

Methods

Name Value Summary
Focus() void
Focuses the control.

Extension Methods

Name Value Summary
CalculateDistanceFromAncestor(IVisual) int
Calculates the distance from a visual's IRenderRoot.
FindCommonVisualAncestor(IVisual) IVisual
Tries to get the first common ancestor of two visuals.
GetInputElementsAt(Point) IEnumerable<IInputElement>
Returns the active input elements at a point on an IInputElement.
GetObservable<TEventArgs>(RoutedEvent<TEventArgs>, RoutingStrategies, bool) IObservable<TEventArgs>
Gets an observable for a RoutedEvent<TEventArgs>.
GetSelfAndVisualAncestors() IEnumerable<IVisual>
Enumerates an IVisual and its ancestors in the visual tree.
GetSelfAndVisualDescendants() IEnumerable<IVisual>
Enumerates an IVisual and its descendants in the visual tree.
GetVisualAncestors() IEnumerable<IVisual>
Enumerates the ancestors of an IVisual in the visual tree.
GetVisualAt(Point) IVisual
Gets the first visual in the visual tree whose bounds contain a point.
GetVisualChildren() IEnumerable<IVisual>
Enumerates the children of an IVisual in the visual tree.
GetVisualDescendants() IEnumerable<IVisual>
Enumerates the descendants of an IVisual in the visual tree.
GetVisualParent() IVisual
Gets the visual parent of an IVisual.
GetVisualParent<T>() T
Gets the visual parent of an IVisual.
GetVisualRoot() IRenderRoot
Gets the root visual for an IVisual.
GetVisualsAt(Point) IEnumerable<IVisual>
Enumerates the visible visuals in the visual tree whose bounds contain a point.
GetVisualsAt(Point, Func<IVisual, bool>) IEnumerable<IVisual>
Enumerates the visuals in the visual tree whose bounds contain a point.
HitTestCustom(Point) bool
InputHitTest(Point) IInputElement
Returns the topmost active input element at a point on an IInputElement.
IsVisualAncestorOf(IVisual) bool
Tests whether an IVisual is an ancestor of another visual.
PointToClient(PixelPoint) Point
Converts a point from screen to client coordinates.
PointToScreen(Point) PixelPoint
Converts a point from client to screen coordinates.
TransformToVisual(IVisual) Matrix?
Returns a transform that transforms the visual's coordinates into the coordinates of the specified to.
TranslatePoint(Point, IVisual) Point?
Translates a point relative to this visual to coordinates that are relative to the specified visual.