Extends ComponentBehavior to provide comprehensive input handling capabilities including mouse, keyboard, and gesture input processing for RadControl components.
ComponentInputBehavior specializes in managing all forms of user input for RadControl instances, building upon the base ComponentBehavior functionality. It handles mouse events (clicks, movement, hovering), keyboard input, touch gestures, and coordinates these inputs with the RadElement tree to provide proper event routing and state management.
Key responsibilities include:
- Mouse event routing and element hit testing
- Element selection and pressed state management
- Mouse capture and release handling
- Hover detection and element monitoring
- Keyboard input processing and routing
- Touch and gesture input handling
- Input state coordination across the element hierarchy
The class maintains various input-related states such as which elements are hovered, pressed, or have captured mouse input, ensuring proper visual feedback and interaction behavior throughout the control's element tree.
Definition
Namespace:Telerik.WinControls
Assembly:Telerik.WinControls.dll
Syntax:
public class ComponentInputBehavior : ComponentBehavior, IDisposable
Inheritance: objectComponentBehaviorComponentInputBehavior
Derived Classes:
Implements:
Inherited Members
Constructors
Initializes a new instance of the ComponentInputBehavior class for the specified component tree handler.
public ComponentInputBehavior(IComponentTreeHandler owner)
The IComponentTreeHandler that owns this input behavior instance.
The constructor calls the base ComponentBehavior constructor and initializes input-specific settings. By default, it enables item tooltips based on the ShowItemToolTips setting.
This constructor establishes the input handling system for the component, preparing it to process mouse, keyboard, and gesture input events and route them appropriately through the element tree.
Properties
Gets or sets a value indicating whether input processing is enabled for this component.
[Browsable(false)]
public bool Enable { get; set; }
true if input events should be processed; otherwise, false. The default is true.
When this property is set to
false, the component will not process mouse, keyboard, or other input events. This can be useful for temporarily disabling interaction during certain operations or states.
Gets the mouse hover timer used to detect and handle mouse hover events.
protected MouseHoverTimer MouseHoverTimer { get; }
A MouseHoverTimer instance used for hover detection and timing.
This timer is used internally to manage mouse hover detection, determining when the mouse has remained stationary over an element long enough to trigger hover-related events and visual feedback such as tooltips.
Methods
protected void HandleMouseLeave(EventArgs e, RadElement elementUnderMouse)
protected virtual void OnHoveredElementChanged(HoveredElementChangedEventArgs e)
Events
Fires when hovered element is changed.
public event HoveredElementChangedEventHandler HoveredElementChanged