Class ScreenControllerBase<TModel>
public abstract class ScreenControllerBase<TModel> : IScreenController<TModel>, IScreenController where TModel : IScreenModel
Type Parameters
TModel
- Inheritance
-
ScreenControllerBase<TModel>
- Implements
-
IScreenController<TModel>
- Derived
- Inherited Members
Constructors
ScreenControllerBase(IServices)
public ScreenControllerBase(IServices services)
Parameters
servicesIServices
Fields
Logger
protected readonly ILogger Logger
Field Value
Services
protected readonly IServices Services
Field Value
Properties
IsActive
True if the screen is currently present on a surface
public bool IsActive { get; }
Property Value
Model
protected TModel Model { get; }
Property Value
- TModel
ModelBound
protected Task ModelBound { get; }
Property Value
Principal
protected IPrincipal Principal { get; }
Property Value
Surface
protected ISurface Surface { get; }
Property Value
Methods
Bind(ISurface, bool)
protected virtual void Bind(ISurface surface, bool asTopLevel)
Parameters
CreateModel(ISurface)
protected abstract TModel CreateModel(ISurface s)
Parameters
sISurface
Returns
- TModel
Deactivate()
Deactivates the screen, removing it from any surface
public virtual void Deactivate()
Display(string, bool)
Activates the screen in a new surface
public void Display(string title = null, bool foreground = true)
Parameters
Embed(ISurface)
Activates the screen embedded within another screen on an existing surface
public TModel Embed(ISurface surface)
Parameters
surfaceISurface
Returns
- TModel
OnClosed()
protected virtual void OnClosed()
OnOpened()
protected virtual void OnOpened()
Pin()
Activates the screen as an always-present main surface.
public void Pin()
Replace(ISurface)
Activates the screen as the main content of an existing surface
public void Replace(ISurface surface)
Parameters
surfaceISurface
Events
Closed
public event Action Closed
Event Type
Opened
public event Action Opened