FocusResult struct
Namespace: Arlecchino.Focus · Assembly: Arlecchino
What a focusable element did with an event: whether it claimed it, and whether that means going somewhere.
public readonly struct FocusResult : IEquatable<FocusResult>
Implements IEquatable<T><FocusResult>
Constructors
| Member | Summary |
|---|---|
FocusResult(bool, ViewRoute) | What a focusable element did with an event: whether it claimed it, and whether that means going somewhere. |
Properties
| Member | Summary |
|---|---|
Handled | The event was mine and nothing else should see it. |
Ignored | The event was not mine; whoever asked should keep looking. |
Route | Where to navigate, if anywhere. |
WasHandled | Whether the element claimed the event. |
Methods
| Member | Summary |
|---|---|
Deconstruct(out bool, out ViewRoute) | |
Navigate(ViewRoute) | The event was mine and the screen should navigate. |
Constructors in detail
FocusResult(bool, ViewRoute)
public FocusResult(bool WasHandled, ViewRoute Route);
What a focusable element did with an event: whether it claimed it, and whether that means going somewhere.
Parameters
| Name | Type | Description |
|---|---|---|
WasHandled | bool | Whether the element claimed the event. |
Route | ViewRoute | Where to navigate, if anywhere. |
Properties in detail
Handled
public static FocusResult Handled { get; }
The event was mine and nothing else should see it.
Type FocusResult
Ignored
public static FocusResult Ignored { get; }
The event was not mine; whoever asked should keep looking.
Type FocusResult
Route
public ViewRoute Route { get; init; }
Where to navigate, if anywhere.
Type ViewRoute
WasHandled
public bool WasHandled { get; init; }
Whether the element claimed the event.
Type bool
Methods in detail
Deconstruct(out bool, out ViewRoute)
public void Deconstruct(out bool WasHandled, out ViewRoute Route);
Parameters
| Name | Type | Description |
|---|---|---|
WasHandled | bool | |
Route | ViewRoute |
Navigate(ViewRoute)
public static FocusResult Navigate(ViewRoute route);
The event was mine and the screen should navigate.
Parameters
| Name | Type | Description |
|---|---|---|
route | ViewRoute | Where to go. |
Returns FocusResult — The result to return.