Class PersistedDocument
public abstract class PersistedDocument : Document, IViewAware, IChild, ICommandHandler<UndoCommandDefinition>, ICommandHandler<RedoCommandDefinition>, ICommandHandler<SaveFileCommandDefinition>, ICommandHandler<SaveFileAsCommandDefinition>, ICommandHandler, IPersistedDocument, IDocument, ILayoutItem, IScreen, IHaveDisplayName, IActivate, IDeactivate, IGuardClose, IClose, INotifyPropertyChangedEx, INotifyPropertyChanged, IPersistedElement
- Inheritance
-
PropertyChangedBaseViewAwareScreenPersistedDocument
- Implements
-
IViewAwareIChildIScreenIHaveDisplayNameIActivateIDeactivateIGuardCloseICloseINotifyPropertyChangedEx
- Inherited Members
-
Screen.OnInitialize()Screen.OnActivate()Screen.ParentScreen.DisplayNameScreen.IsActiveScreen.IsInitializedScreen.ActivatedScreen.AttemptingDeactivationScreen.DeactivatedViewAware.DefaultContextViewAware.ViewsViewAware.ViewAttachedPropertyChangedBase.Refresh()PropertyChangedBase.IsNotifyingPropertyChangedBase.PropertyChanged
Properties
FileName
public virtual string FileName { get; }
Property Value
FilePath
public virtual string FilePath { get; }
Property Value
IsDirty
public bool IsDirty { get; set; }
Property Value
IsNew
public bool IsNew { get; }
Property Value
Methods
CanClose(Action<bool>)
Called to check whether or not this instance can close.
public override void CanClose(Action<bool> callback)
Parameters
DoLoad(string)
protected abstract Task DoLoad(string filePath)
Parameters
filePath
string
Returns
DoNew()
protected abstract Task DoNew()
Returns
DoSave(string)
protected abstract Task DoSave(string filePath)
Parameters
filePath
string
Returns
Load(string)
public Task Load(string filePath)
Parameters
filePath
string
Returns
New(string)
public Task New(string fileName)
Parameters
fileName
string
Returns
OnViewLoaded(object)
Called when an attached view's Loaded event fires.
protected override void OnViewLoaded(object view)
Parameters
view
object
Save(string)
public Task Save(string filePath)
Parameters
filePath
string
Returns
TryClose(bool?)
Tries to close and opens a dialog if there are unsaved changes.
public override void TryClose(bool? dialogResult = null)
Parameters
dialogResult
bool?Result from a dialog
UpdateDisplayName()
protected void UpdateDisplayName()