Skip to main content

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

MemberSummary
FocusResult(bool, ViewRoute)What a focusable element did with an event: whether it claimed it, and whether that means going somewhere.

Properties

MemberSummary
HandledThe event was mine and nothing else should see it.
IgnoredThe event was not mine; whoever asked should keep looking.
RouteWhere to navigate, if anywhere.
WasHandledWhether the element claimed the event.

Methods

MemberSummary
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

NameTypeDescription
WasHandledboolWhether the element claimed the event.
RouteViewRouteWhere 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

NameTypeDescription
WasHandledbool
RouteViewRoute
public static FocusResult Navigate(ViewRoute route);

The event was mine and the screen should navigate.

Parameters

NameTypeDescription
routeViewRouteWhere to go.

Returns FocusResult — The result to return.