Class NodeListViewModel
A viewmodel for a UI List component that contains NodeViewModels and can be used to let the user add new nodes to a network.
Inheritance
Implements
Inherited Members
Namespace: NodeNetwork.Toolkit.NodeList
Assembly: NodeNetworkToolkit.dll
Syntax
public class NodeListViewModel : ReactiveObject, IReactiveNotifyPropertyChanged<IReactiveObject>, IHandleObservableErrors, IReactiveObject, INotifyPropertyChanged, INotifyPropertyChanging, IEnableLogger
Constructors
| Improve this Doc View SourceNodeListViewModel()
Declaration
public NodeListViewModel()
Properties
| Improve this Doc View SourceDisplay
The way the list of available nodes is formatted.
Declaration
public NodeListViewModel.DisplayMode Display { get; set; }
Property Value
Type | Description |
---|---|
NodeListViewModel.DisplayMode |
EmptyLabel
The string that is displayed when VisibleNodes is empty.
Declaration
public string EmptyLabel { get; set; }
Property Value
Type | Description |
---|---|
System.String |
NodeTemplates
List of all the available nodes in the list.
Declaration
public ISourceList<NodeTemplate> NodeTemplates { get; }
Property Value
Type | Description |
---|---|
DynamicData.ISourceList<NodeTemplate> |
SearchQuery
The current search string that is used to filter Nodes into VisibleNodes.
Declaration
public string SearchQuery { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Title
The string that is displayed at the top of the list
Declaration
public string Title { get; set; }
Property Value
Type | Description |
---|---|
System.String |
VisibleNodes
List of nodes that are actually visible in the list. This list is based on Nodes and SearchQuery.
Declaration
public IObservableList<NodeViewModel> VisibleNodes { get; }
Property Value
Type | Description |
---|---|
DynamicData.IObservableList<NodeViewModel> |
Methods
| Improve this Doc View SourceAddNodeType<T>(Func<T>)
Adds a new node type to the list. Every time a node is added to a network from this list, the factory function will be called to create a new instance of the viewmodel type.
Declaration
public void AddNodeType<T>(Func<T> factory)
where T : NodeViewModel
Parameters
Type | Name | Description |
---|---|---|
System.Func<T> | factory | The factory function to create a new instance of T |
Type Parameters
Name | Description |
---|---|
T | The subtype of NodeViewModel to add to the list. |