ReactiveRunicWindow<TViewModel> class

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

public abstract class ReactiveRunicWindow<TViewModel> : RunicWindow<TViewModel>, IViewFor<TViewModel>, IViewFor, IActivatableView, IRunicViewLifetime, IRunicWebMountLifetime where TViewModel : class

Inherits or implements RunicWindow, IViewFor, IViewFor, IActivatableView, IRunicViewLifetime, IRunicWebMountLifetime.

A native Runic Window with ReactiveUI's typed ViewModel and mount activation. Each instance owns one activation lease, so a presentation-aware content session can resolve several Views for the same ViewModel safely.

Constructors

ReactiveRunicWindow

protected ReactiveRunicWindow(TViewModel dataContext)

Creates a window for its root ViewModel.

Properties

DataContext

public override TViewModel? DataContext { get; set; }

The typed ViewModel; assigning it rebinds ReactiveUI activation.

ViewModel

public TViewModel? ViewModel { get; set; }

The same as ReactiveRunicWindow.DataContext, as required by IViewFor.

Methods

OnAttached

public virtual void OnAttached()

Called when the view starts being presented.

Documentation from IRunicViewLifetime.OnAttached.

OnDetached

public virtual void OnDetached()

Called when the view stops being presented; deactivates the ViewModel.

OnWebMounted

public void OnWebMounted()

Activates an IActivatableViewModel when the web component mounts.

OnWebUnmounted

public void OnWebUnmounted()

Deactivates the ViewModel when the web component unmounts.