Class TemplateViewModel
View model representing a template.
Implements
Inherited Members
Namespace: Phoenix.Aruba
Assembly: Phoenix.Plugin.Aruba.dll
Syntax
public class TemplateViewModel : BindableBase, INotifyPropertyChanged
Remarks
Initializes a new instance of the TemplateViewModel class.
Constructors
View SourceTemplateViewModel(TemplateDefinition)
View model representing a template.
Declaration
public TemplateViewModel(TemplateDefinition templateDefinition)
Parameters
Type | Name | Description |
---|---|---|
TemplateDefinition | templateDefinition | The template definition. |
Remarks
Initializes a new instance of the TemplateViewModel class.
Properties
View SourceDisplayName
Gets or sets the template's display name.
Declaration
public string DisplayName { get; set; }
Property Value
Type | Description |
---|---|
string |
IsDirty
Gets or sets a value indicating whether this template has unsaved changes.
Declaration
public bool IsDirty { get; set; }
Property Value
Type | Description |
---|---|
bool |
IsFavorite
Gets or sets a value indicating whether this template is a favorite template.
Declaration
public bool IsFavorite { get; set; }
Property Value
Type | Description |
---|---|
bool |
IsRenaming
Gets or sets a value indicating whether the template is in rename mode or not.
Declaration
public bool IsRenaming { get; set; }
Property Value
Type | Description |
---|---|
bool |
Name
Gets the template's name.
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
string |
SavedName
Gets the name that this is currently saved as, in the data store. If this does not have a corresponding store item, this returns null.
Declaration
public string SavedName { get; }
Property Value
Type | Description |
---|---|
string |
SavedTemplateDefinition
Gets matches what is saved in the data store, not necessarily what is being edited.
Declaration
public TemplateDefinition SavedTemplateDefinition { get; }
Property Value
Type | Description |
---|---|
TemplateDefinition |
TemplateDefinition
Gets or sets the template definition.
Declaration
public TemplateDefinition TemplateDefinition { get; set; }
Property Value
Type | Description |
---|---|
TemplateDefinition |
TemplateTreeItem
Gets or sets the tree item for this view model.
Declaration
public TemplateTreeItemViewModel TemplateTreeItem { get; set; }
Property Value
Type | Description |
---|---|
TemplateTreeItemViewModel |
Methods
View SourceCheckAndStripSuffixFromName(string)
Utility to strip a number suffix from a given name, if present.
Declaration
public static string CheckAndStripSuffixFromName(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name to strip the number suffix from. |
Returns
Type | Description |
---|---|
string | The stripped name without number suffix. |
RevertTemplateDefinition()
Revert changes to the current TemplateDefinition
Declaration
public void RevertTemplateDefinition()
ToString()
Returns a display name for the template.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | The display name for the template. |
Overrides
View SourceUpdateSavedTemplateDefinition()
Create a snapshot of the template definition. To be called at the point when the state of this template reflects what is saved in the data store.
Declaration
public void UpdateSavedTemplateDefinition()