-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathITreeSelector.cs
77 lines (66 loc) · 2.55 KB
/
ITreeSelector.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
namespace BreadcrumbTestLib.ViewModels.Interfaces
{
using System.ComponentModel;
/// <summary>
/// Implement Tree based structure and support LookupProcessing.
/// </summary>
/// <typeparam name="VM">Sub-node viewmodel type.</typeparam>
/// <typeparam name="M">Type to identify a node, commonly string.</typeparam>
public interface ITreeSelector<VM, M> : INotifyPropertyChanged
{
#region properties
/// <summary>
/// Whether current view model is selected.
/// </summary>
bool IsSelected { get; set; }
/// <summary>
/// This is marked by TreeRootSelector, for overflow menu support.
/// </summary>
bool IsRoot { get; set; }
/// <summary>
/// Based on IsRoot and IsChildSelected
/// </summary>
bool IsRootAndIsChildSelected { get; }
/// <summary>
/// Gets whether a child of current view model is selected.
/// </summary>
bool IsChildSelected { get; }
/// <summary>
/// Gets the model of the selected child item.
/// </summary>
M SelectedChild { get; set; }
/// <summary>
/// Gets the instance of the model object that represents this selection helper.
/// The model backs the ViewModel property and should be in sync
/// with it.
/// </summary>
M Value { get; }
/// <summary>
/// Gets the owning ViewModel of this selection helper.
/// </summary>
VM ViewModel { get; }
/// <summary>
/// Gets All sub-entries of the current tree item
/// to support loading tree items.
/// </summary>
IBreadcrumbTreeItemHelperViewModel<VM> EntryHelper { get; }
/// <summary>
/// Gets whether this entry is currently overflowed (should be hidden
/// because its to large for display) or a root element, or both.
///
/// This can be used by binding system to determine whether an element should
/// be visble in the root drop down list, because overflowed or root
/// items should be visible in the root drop down list for
/// overflowed and root items.
/// </summary>
bool IsOverflowedOrRoot { get; }
/// <summary>
/// Gets/sets whether the BreadCrumb Tree item is currently overflowed
/// (does not fit into the view display area) or not.
/// </summary>
bool IsOverflowed { get; }
#endregion properties
#region methods
#endregion methods
}
}