Show / Hide Table of Contents

Class TemplateTreeItemViewModel

A class containing the logic for a Template Tree Item. See also TreeItemViewModelBase.

Inheritance
object
BindableBase
TreeItemViewModelBase
TemplateTreeItemViewModel
Implements
INotifyPropertyChanged
Inherited Members
TreeItemViewModelBase.ParentItemVM
TreeItemViewModelBase.IsRoot
TreeItemViewModelBase.Children
TreeItemViewModelBase.IsSelected
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)
object.ToString()
Namespace: Phoenix.Aruba
Assembly: Phoenix.Plugin.Aruba.dll
Syntax
public class TemplateTreeItemViewModel : TreeItemViewModelBase, INotifyPropertyChanged

Constructors

View Source

TemplateTreeItemViewModel(TemplateViewModel)

Initializes a new instance of the TemplateTreeItemViewModel class.

Declaration
public TemplateTreeItemViewModel(TemplateViewModel templateViewModel)
Parameters
Type Name Description
TemplateViewModel templateViewModel

The template view model associated with this item.

View Source

TemplateTreeItemViewModel(TreeItemViewModelBase)

Initializes a new instance of the TemplateTreeItemViewModel class.

Declaration
public TemplateTreeItemViewModel(TreeItemViewModelBase parentItemVM)
Parameters
Type Name Description
TreeItemViewModelBase parentItemVM

The parent of this tree item.

Properties

View Source

ChildIsDirty

Gets a value indicating whether any of this item's children are dirty.

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

ChildrenTemplateVMs

Gets the Children as an enumerable of Template View Models.

Declaration
public IEnumerable<TemplateViewModel> ChildrenTemplateVMs { get; }
Property Value
Type Description
IEnumerable<TemplateViewModel>
View Source

ChildrenTreeItemVMs

Gets the Children as an enumerable of Tree Item View Models.

Declaration
public IEnumerable<TemplateTreeItemViewModel> ChildrenTreeItemVMs { get; }
Property Value
Type Description
IEnumerable<TemplateTreeItemViewModel>
View Source

IsExpanded

Gets or sets a value indicating whether the item is expanded.

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

TemplateViewModel

Gets the template view model associated with this tree item.

Declaration
public TemplateViewModel TemplateViewModel { get; }
Property Value
Type Description
TemplateViewModel

Methods

View Source

ChangeParent(bool, bool, TemplateViewModel, Action<TemplateDefinition>)

Change the item's parent.

Declaration
public void ChangeParent(bool makeRoot, bool moveChildren, TemplateViewModel newParent, Action<TemplateDefinition> updateFunc)
Parameters
Type Name Description
bool makeRoot

Whether to set the parent to the root.

bool moveChildren

Whether to move the item's children with it.

TemplateViewModel newParent

The new parent.

Action<TemplateDefinition> updateFunc

The function to update the item.

View Source

ExpandUpTheTree()

Walks up the tree and expands each parent.

Declaration
public void ExpandUpTheTree()
View Source

GetAllGuids()

Recursive function to get the Guid(s) of the current TemplateTreeItemViewModel object and all of it's children.

Declaration
public List<Guid> GetAllGuids()
Returns
Type Description
List<Guid>

Returns a list of Guid.

View Source

GetAllTreeItemVMs()

Recursive function to get the TemplateTreeItemViewModel(s) of the current object and all of it's children.

Declaration
public List<TemplateTreeItemViewModel> GetAllTreeItemVMs()
Returns
Type Description
List<TemplateTreeItemViewModel>

Returns a list of TemplateTreeItemViewModel.

View Source

PrepareForDeletion(Action<TemplateDefinition>)

Update all hierarchy links in preparation for deletion.

Declaration
public ObservableCollection<TreeItemViewModelBase> PrepareForDeletion(Action<TemplateDefinition> updateFunc)
Parameters
Type Name Description
Action<TemplateDefinition> updateFunc

The update function to use.

Returns
Type Description
ObservableCollection<TreeItemViewModelBase>

Returns children of collection if parent was root, otherwise null.

View Source

PrepareForParentChange()

Get the item ready for a their parent to change.

Declaration
public void PrepareForParentChange()
View Source

PrepareForParentUpdate()

Removes any fields that are from the parent template (except those that were overridden) in preparation for an update from a parent. Recurse through children as well.

Declaration
public void PrepareForParentUpdate()
View Source

ProcessParentRename(Guid)

Update parent template name in the template view model and any fields from that parent.

Declaration
public void ProcessParentRename(Guid renamedParentId)
Parameters
Type Name Description
Guid renamedParentId

The id of the parent that was renamed.

View Source

SaveQueryToChildrenIfApplicable(DuplicateCheckQueryDefinition)

Applies a DuplicateCheckQueryDefinition to the children of this template if the child doesn't have a query saved, or whose definition is not unique from the parent's. If the child's saved query definition is unique, its DuplicateCheckQueryDefinition will not be overriden.

Declaration
public void SaveQueryToChildrenIfApplicable(DuplicateCheckQueryDefinition newDefinition)
Parameters
Type Name Description
DuplicateCheckQueryDefinition newDefinition

The new query definition to apply to children.

View Source

UpdateTemplate(Action<TemplateDefinition>)

Update the template definition and its children recursively.

Declaration
public void UpdateTemplate(Action<TemplateDefinition> updateFunc)
Parameters
Type Name Description
Action<TemplateDefinition> updateFunc

The update function to use.

Implements

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