Class ScreenModelBase
This basic IScreenModel provides overridable properties with useful defaults
public abstract class ScreenModelBase : NotificationObject, IScreenModel, IModel, INotifyPropertyChanged
- Inheritance
-
ScreenModelBase
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
ScreenModelBase(ISurface)
public ScreenModelBase(ISurface surface)
Parameters
surfaceISurface
Properties
AreCommandsEnabled
Indicates whether the screen's commands are enabled. Commands may still be disabled individually even if this returns true
public virtual bool AreCommandsEnabled { get; }
Property Value
CancelCommand
can be invoked to cancel a screen
public IScreenCommand CancelCommand { get; set; }
Property Value
Commands
this collection may be modified to change the screen's set of commands
public IReadOnlyList<IScreenCommand> Commands { get; set; }
Property Value
ConfirmCommand
can be invoked as the default action of a screen.
public IScreenCommand ConfirmCommand { get; set; }
Property Value
HasChanges
public virtual bool HasChanges { get; }
Property Value
HasTitleBar
If false, the title and commands will not be displayed.
public bool HasTitleBar { get; set; }
Property Value
Icons
this collection may be modified to change the icons displayed next to the title
public IReadOnlyList<IconModel> Icons { get; set; }
Property Value
IsEditable
public virtual bool IsEditable { get; }
Property Value
IsValid
public virtual bool IsValid { get; }
Property Value
RefreshCommand
can be invoked commands to reload a screen's data.
public IScreenCommand RefreshCommand { get; set; }
Property Value
SaveCommand
can be invoked to store a screen's data.
public IScreenCommand SaveCommand { get; set; }
Property Value
ScreenTitle
this property may be set or modified to change the screen's title
public virtual string ScreenTitle { get; set; }
Property Value
Services
protected IServices Services { get; }
Property Value
Surface
set by constructor- every screenmodel must be 'located on' a shell-defined IScreen
public ISurface Surface { get; }
Property Value
Methods
GetBlockingChangesAsync()
public virtual Task<IEnumerable<Change>> GetBlockingChangesAsync()
Returns
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.