- mpcv_src.zip
- Components
- FolderBrowserModel
- MPCV
- MVVM
- Powershell
- mpcv_bin.zip
- de
- System.Windows.Interactivity.resources.dll
- en
- System.Windows.Interactivity.resources.dll
- es
- System.Windows.Interactivity.resources.dll
- fr
- System.Windows.Interactivity.resources.dll
- Help
- it
- System.Windows.Interactivity.resources.dll
- ja
- System.Windows.Interactivity.resources.dll
- ko
- System.Windows.Interactivity.resources.dll
- Lobster.Components.dll
- Lobster.FolderBrowser.dll
- Lobster.MVVM.dll
- Lobster.Powershell.dll
- MPCV.exe
- System.Windows.Interactivity.dll
- System.Windows.Interactivity.xml
- zh-Hans
- System.Windows.Interactivity.resources.dll
- zh-Hant
- System.Windows.Interactivity.resources.dll
|
// This file is part of the Lobster.MVVM library
// Copyright: Andreas Raczek
// This file is published under the The Code Project Open License (CPOL)
// See the file "CPOL.html" for the full license governing this code.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.Collections.ObjectModel;
using System.Collections;
namespace Lobster.MVVM.VM.TreeVM
{
public interface ITreeNodeVM : INotifyPropertyChanged, ITemplateNameProvider
{
ReadOnlyObservableCollection<ITreeNodeVM> SubItems { get; }
object Item { get; }
string DisplayName { get; }
string DefaultDisplayName { get; set; }
/// <summary>
/// Allows binding the selection state of TreeViewItem to
/// the ViemModel. Doing this is known to be the easiest way
/// of controlling the item selection in a MVVM treeview.
/// </summary>
bool IsSelected { get; set; }
// ITemplateNameProvider only allows reading, I am extending
// it here to allow to set it directly
new string TemplateName { get; set; }
}
public interface ITreeLeafVM : ITreeNodeVM
{
}
public delegate ITreeNodeVM TCreateItemBox(ITreeDynamicNode parent, object subItem);
public interface ITreeNodeFactory
{
ITreeLeafVM AddLeaf(object item, string displayNameProperty);
ITreeStaticNode AddStaticNode(object item, string displayNameProperty);
ITreeDynamicNode AddDynamicNode(object item, string displayNameProperty, ICollection subItems, TCreateItemBox createItemBox);
}
public interface ITreeStaticNode : ITreeNodeVM, ITreeNodeFactory
{
}
public interface ITreeDynamicNode : ITreeNodeVM
{
ITreeLeafVM CreateLeaf(object item, string displayNameProperty);
ITreeDynamicNode CreateDynamicNode(object item, string displayNameProperty, ICollection subItems, TCreateItemBox createItemBox);
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.