FocusChangingEventArgs Class
Definition
public class FocusChangingEventArgs
Methods
| Name | Description |
|---|---|
| TryCancel | Attempts to cancel the current focus change |
| TrySetNewFocusedElement | Attempts to redirect focus from the targeted element to the specified element. |
TryCancel Method
Attempts to cancel the current focus change
public bool TryCancel()
Returns
bool
true if focus change was cancelled; otherwise, false
TrySetNewFocusedElement Method
Attempts to redirect focus from the targeted element to the specified element.
public bool TrySetNewFocusedElement(Avalonia.Input.IInputElement inputElement)
Parameters
inputElement Avalonia.Input.IInputElement
Returns
bool
Properties
| Name | Description |
|---|---|
| Canceled | Gets whether focus change is canceled. |
| KeyModifiers | Gets or sets any key modifiers active at the time of focus. |
| NavigationMethod | Gets or sets a value indicating how the change in focus occurred. |
| NewFocusedElement | Gets or sets the element that focus has moved to. |
| OldFocusedElement | Gets or sets the element that previously had focus. |
| Handled | Gets or sets a value indicating whether the routed event has already been handled. Inherited from RoutedEventArgs. |
| Route | Gets or sets the routing strategy (direct, bubbling, or tunneling) of the routed event. Inherited from RoutedEventArgs. |
| RoutedEvent | Gets or sets the routed event associated with these event args. Inherited from RoutedEventArgs. |
| Source | Gets or sets the source object that raised the routed event. Inherited from RoutedEventArgs. |
Canceled Property
Gets whether focus change is canceled.
public bool Canceled { get; set; }
KeyModifiers Property
Gets or sets any key modifiers active at the time of focus.
public Avalonia.Input.KeyModifiers KeyModifiers { get; set; }
NavigationMethod Property
Gets or sets a value indicating how the change in focus occurred.
public Avalonia.Input.NavigationMethod NavigationMethod { get; set; }
NewFocusedElement Property
Gets or sets the element that focus has moved to.
public Avalonia.Input.IInputElement NewFocusedElement { get; set; }
OldFocusedElement Property
Gets or sets the element that previously had focus.
public Avalonia.Input.IInputElement OldFocusedElement { get; set; }