Class RoutingState
- Namespace
- ReactiveUI
- Assembly
- ReactiveUI.dll
RoutingState manages the ViewModel Stack and allows ViewModels to navigate to other ViewModels.
[DataContract]
public class RoutingState : ReactiveObject, IReactiveNotifyPropertyChanged<IReactiveObject>, IHandleObservableErrors, IReactiveObject, INotifyPropertyChanged, INotifyPropertyChanging, IEnableLogger
- Inheritance
-
RoutingState
- Implements
- Inherited Members
- Extension Methods
Constructors
RoutingState(IScheduler?)
Initializes a new instance of the RoutingState class.
public RoutingState(IScheduler? scheduler = null)
Parameters
scheduler
ISchedulerA scheduler for where to send navigation changes to.
Properties
CurrentViewModel
Gets or sets the current view model which is to be shown for the Routing.
[IgnoreDataMember]
[JsonIgnore]
public IObservable<IRoutableViewModel> CurrentViewModel { get; protected set; }
Property Value
Navigate
Gets or sets a command that navigates to the a new element in the stack - the Execute parameter must be a ViewModel that implements IRoutableViewModel.
[IgnoreDataMember]
[JsonIgnore]
public ReactiveCommand<IRoutableViewModel, IRoutableViewModel> Navigate { get; protected set; }
Property Value
NavigateAndReset
Gets or sets a command that navigates to a new element and resets the navigation stack (i.e. the new ViewModel will now be the only element in the stack) - the Execute parameter must be a ViewModel that implements IRoutableViewModel.
[IgnoreDataMember]
[JsonIgnore]
public ReactiveCommand<IRoutableViewModel, IRoutableViewModel> NavigateAndReset { get; protected set; }
Property Value
NavigateBack
Gets or sets a command which will navigate back to the previous element in the stack.
[IgnoreDataMember]
[JsonIgnore]
public ReactiveCommand<Unit, IRoutableViewModel> NavigateBack { get; protected set; }
Property Value
NavigationChanged
Gets or sets an observable which will signal when the Navigation changes.
[IgnoreDataMember]
[JsonIgnore]
public IObservable<IChangeSet<IRoutableViewModel>> NavigationChanged { get; protected set; }
Property Value
NavigationStack
Gets or sets the current navigation stack, the last element in the collection being the currently visible ViewModel.
[DataMember]
public ObservableCollection<IRoutableViewModel> NavigationStack { get; set; }