Table of Contents

Class ModalControllerBase<TModel, TResult>

Namespace
The.WPF.Screens
Assembly
Instagile.WPF.dll
public abstract class ModalControllerBase<TModel, TResult> : IModalController<TResult> where TModel : IScreenModel

Type Parameters

TModel
TResult
Inheritance
ModalControllerBase<TModel, TResult>
Implements
Derived
Inherited Members

Constructors

ModalControllerBase(IServices)

public ModalControllerBase(IServices services)

Parameters

services IServices

Fields

Logger

protected readonly ILogger Logger

Field Value

ILogger

Services

protected readonly IServices Services

Field Value

IServices

Properties

Model

protected TModel Model { get; }

Property Value

TModel

Principal

protected IPrincipal Principal { get; }

Property Value

IPrincipal

Surface

protected ISurface Surface { get; }

Property Value

ISurface

Methods

Bind(ISurface)

protected virtual void Bind(ISurface surface)

Parameters

surface ISurface

CompleteCancelled()

protected void CompleteCancelled()

CompleteWithResult(TResult)

protected void CompleteWithResult(TResult result)

Parameters

result TResult

CreateModel(ISurface)

protected abstract TModel CreateModel(ISurface s)

Parameters

s ISurface

Returns

TModel

DisplayModal(ISurface)

public Task<ModalResult<TResult>> DisplayModal(ISurface surface = null)

Parameters

surface ISurface

Returns

Task<ModalResult<TResult>>

OnCompleted()

This handler is invoked after the modal completes which could be due to it completing with a result or due to it being cancelled. This method should only perform cleanup of event handlers and similar.

protected virtual void OnCompleted()

Remarks

See OnConfirmAsync() and OnConfirmAsync() for an appropriate place to put business logic that should run immediately before confirming this modal.

OnDisplayed()

protected virtual Task OnDisplayed()

Returns

Task

OnModelCreated()

protected virtual void OnModelCreated()