Table of Contents

Class TestSurface

Namespace
The.WPF.Mocks
Assembly
Instagile.WPF.dll
public class TestSurface : ISurface
Inheritance
TestSurface
Implements
Inherited Members
Extension Methods

Constructors

TestSurface(IServices, TestShell, IPrincipal)

public TestSurface(IServices services, TestShell shell, IPrincipal principal = null)

Parameters

services IServices
shell TestShell
principal IPrincipal

Fields

ModalFor

public TestSurface ModalFor

Field Value

TestSurface

Modals

public readonly Stack<TestSurface> Modals

Field Value

Stack<TestSurface>

Model

public IScreenModel Model

Field Value

IScreenModel

Notifications

public readonly List<string> Notifications

Field Value

List<string>

Shell

public readonly TestShell Shell

Field Value

TestShell

Properties

ContentContainer

public UIElement ContentContainer { get; }

Property Value

UIElement

CurrentModalContent

public IScreenModel CurrentModalContent { get; }

Property Value

IScreenModel

Principal

public IPrincipal Principal { get; }

Property Value

IPrincipal

Services

public IServices Services { get; }

Property Value

IServices

Window

public Window Window { get; }

Property Value

Window

Methods

Activate()

Switch UI to an existing screen, bringing it to the user's attention

public void Activate()

CancelModal(bool)

public Task CancelModal(bool ensureModalExists = false)

Parameters

ensureModalExists bool

Returns

Task

ClearNotifications()

public void ClearNotifications()

Close()

public void Close()

ConfirmModal(bool)

public Task ConfirmModal(bool ensureModalExists = false)

Parameters

ensureModalExists bool

Returns

Task

PopModalContent()

End display of the most recent modal subscreen

public void PopModalContent()

PushModalContent(IScreenModel)

Display a subscreen modally - this method should not block

public void PushModalContent(IScreenModel model)

Parameters

model IScreenModel

SetContent(IScreenModel)

Set or replace the content

public void SetContent(IScreenModel model)

Parameters

model IScreenModel

ShowNotification(string, MessageLevel, string, TimeSpan?)

Display an event notification non-modally

public void ShowNotification(string notification, MessageLevel level, string details = null, TimeSpan? timeout = null)

Parameters

notification string
level MessageLevel
details string
timeout TimeSpan?

Events

ContentChanging

Should be triggered when a surface's content is about to be changed

public event Action ContentChanging

Event Type

Action

ScreenDisposed

Should be triggered when a surface is no longer present in the UI

public event Action ScreenDisposed

Event Type

Action