Show / Hide Table of Contents

Class TemplateViewModel

View model representing a template.

Inheritance
object
BindableBase
TemplateViewModel
Implements
INotifyPropertyChanged
Inherited Members
BindableBase.SetProperty<T>(ref T, T, string)
BindableBase.SetProperty<T>(ref T, T, Action, string)
BindableBase.RaisePropertyChanged(string)
BindableBase.OnPropertyChanged(PropertyChangedEventArgs)
BindableBase.PropertyChanged
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
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 Source

TemplateViewModel(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 Source

DisplayName

Gets or sets the template's display name.

Declaration
public string DisplayName { get; set; }
Property Value
Type Description
string
View Source

IsDirty

Gets or sets a value indicating whether this template has unsaved changes.

Declaration
public bool IsDirty { get; set; }
Property Value
Type Description
bool
View Source

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
View Source

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
View Source

Name

Gets the template's name.

Declaration
public string Name { get; }
Property Value
Type Description
string
View Source

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
View Source

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
View Source

TemplateDefinition

Gets or sets the template definition.

Declaration
public TemplateDefinition TemplateDefinition { get; set; }
Property Value
Type Description
TemplateDefinition
View Source

TemplateTreeItem

Gets or sets the tree item for this view model.

Declaration
public TemplateTreeItemViewModel TemplateTreeItem { get; set; }
Property Value
Type Description
TemplateTreeItemViewModel

Methods

View Source

CheckAndStripSuffixFromName(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.

View Source

RevertTemplateDefinition()

Revert changes to the current TemplateDefinition

Declaration
public void RevertTemplateDefinition()
View Source

ToString()

Returns a display name for the template.

Declaration
public override string ToString()
Returns
Type Description
string

The display name for the template.

Overrides
object.ToString()
View Source

UpdateSavedTemplateDefinition()

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()

Implements

INotifyPropertyChanged
  • View Source
In this article
Back to top Generated by DocFX