Skip to content

RoutingState.NavigationStackChanged property

Defined in

Type: RoutingState Namespace: ReactiveUI.Reactive Assembly: ReactiveUI.Reactive.dll

Applies to

net10.0, net10.0-ios26.0, net10.0-android36.0, net10.0-maccatalyst26.0, net10.0-tvos26.0, net10.0-macos26.0, net9.0, net8.0, net462, net481

Attributes: [IgnoreDataMember] [JsonIgnore]

public IObservable<IReadOnlyList<IRoutableViewModel>> NavigationStackChanged { get; protected set; }

View source

Summary: Gets an observable of the navigation stack. After every change to NavigationStack it emits a read-only snapshot of the whole stack, oldest view model first and the current view model last. It emits nothing when you subscribe; read NavigationStack for the stack as it is now.

Returns: IObservable>

Remarks

        Each snapshot is a copy. Navigating again does not change a snapshot you already hold.

Examples

<![CDATA[
 using var subscription = screen.Router.NavigationStackChanged
 .Subscribe(stack => Console.WriteLine(string.Join(" > ", stack.Select(page => page.UrlPathSegment))));
 ]]>