ReactiveRoutedRegion<TViewModel> class

Namespace Runic.Application.Views.ReactiveUI.Reactive · Runic.Application.ReactiveUI.Reactive 0.7.0-preview.5

public sealed class ReactiveRoutedRegion<TViewModel> : INotifyPropertyChanged, IDisposable where TViewModel : class

Inherits or implements INotifyPropertyChanged, IDisposable.

Projects one ReactiveUI router into an observable content property.

Remarks

An incompatible route or a failed router is logged in the category RunicViewsTelemetry.LogCategory (events 1040 and 1041), or written to Trace when the region has no logger factory.

Constructors

ReactiveRoutedRegion

public ReactiveRoutedRegion(RoutingState router)

Observes router's current ViewModel and writes failures to Trace.

ReactiveRoutedRegion

public ReactiveRoutedRegion(RoutingState router, ILoggerFactory? loggerFactory)

Observes router's current ViewModel.

Parameters

router

The router to project.

loggerFactory

Creates the region's logger, or null for Trace output.

Properties

Current

public TViewModel? Current { get; }

The routed ViewModel, or null when the route is empty or incompatible.

Methods

Dispose

public void Dispose()

Stops observing the router.

Events

PropertyChanged

public event PropertyChangedEventHandler? PropertyChanged

Inherits documentation from INotifyPropertyChanged.PropertyChanged.