Interface ITreeViewComponent
A component for displaying a hierarchical collection of text labels. Each label is a node in the tree which can be collapsed/expanded to hide/show its children.
Inherited Members
Namespace: AGS.API
Assembly: AGS.API.dll
Syntax
[RequiredComponent(typeof(IInObjectTreeComponent), true)]
[RequiredComponent(typeof(IDrawableInfoComponent), true)]
public interface ITreeViewComponent : IComponent, IDisposable, INotifyPropertyChanged
Properties
| Improve this Doc View SourceAllowSelection
Gets or sets whether to allow selecting nodes in the tree.
Declaration
SelectionType AllowSelection { get; set; }
Property Value
Type | Description |
---|---|
SelectionType | The allow selection. |
HorizontalSpacing
Gets or sets the horizontal spacing between each level in the tree.
Declaration
float HorizontalSpacing { get; set; }
Property Value
Type | Description |
---|---|
System.Single | The horizontal spacing. |
LayoutPaused
Allow pausing/resuming the tree layout.
Declaration
bool LayoutPaused { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
LeftPadding
Gets or sets the left padding for the tree view.
Declaration
float LeftPadding { get; set; }
Property Value
Type | Description |
---|---|
System.Single | The left padding. |
NodeViewProvider
Gets or sets the node view provider, which is responsible for displaying a node in the tree.
Declaration
ITreeNodeViewProvider NodeViewProvider { get; set; }
Property Value
Type | Description |
---|---|
ITreeNodeViewProvider | The node view provider. |
OnNodeCollapsed
An event which fires every time a node is expanded.
Declaration
IBlockingEvent<NodeEventArgs> OnNodeCollapsed { get; }
Property Value
Type | Description |
---|---|
IBlockingEvent<NodeEventArgs> |
OnNodeExpanded
An event which fires every time a node is expanded.
Declaration
IBlockingEvent<NodeEventArgs> OnNodeExpanded { get; }
Property Value
Type | Description |
---|---|
IBlockingEvent<NodeEventArgs> |
OnNodeSelected
An event which fires every time a node is selected (if AllowSelection is set to allow selection).
Declaration
IBlockingEvent<NodeEventArgs> OnNodeSelected { get; }
Property Value
Type | Description |
---|---|
IBlockingEvent<NodeEventArgs> |
ScrollingContainer
If the tree view is contained in a scrolling panel (CreateScrollingPanel(IPanel, Single, Single, Single)), you can set the containing contents panel here, which the tree view will then use to optimize performance by only loading the tree node views when they're inside the scrolling range.
Declaration
IEntity ScrollingContainer { get; set; }
Property Value
Type | Description |
---|---|
IEntity | The scrolling container. |
SearchFilter
Gets or sets the search filter (a search text that filters the tree so that only items containing the text appear in the tree).
Declaration
string SearchFilter { get; set; }
Property Value
Type | Description |
---|---|
System.String | The search filter. |
SkipRenderingRoot
Gets or sets a value indicating whether this ITreeViewComponent skip rendering the root node. This effectively means that the tree will show multiple "detached" roots (all the nodes in the second level in the tree), i.e it makes it possible for the tree view to show multiple "trees".
Declaration
bool SkipRenderingRoot { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
TopPadding
Gets or sets the top padding for the tree view.
Declaration
float TopPadding { get; set; }
Property Value
Type | Description |
---|---|
System.Single | The top padding. |
Tree
The tree of text items to show.
Declaration
ITreeStringNode Tree { get; set; }
Property Value
Type | Description |
---|---|
ITreeStringNode | The tree. |
VerticalSpacing
Gets or sets the vertical spacing between each child in the tree.
Declaration
float VerticalSpacing { get; set; }
Property Value
Type | Description |
---|---|
System.Single | The vertical spacing. |
Methods
| Improve this Doc View SourceCollapse(ITreeStringNode)
Collapse the specified node.
Declaration
void Collapse(ITreeStringNode node)
Parameters
Type | Name | Description |
---|---|---|
ITreeStringNode | node | Node. |
Expand(ITreeStringNode)
Expand the specified node.
Declaration
void Expand(ITreeStringNode node)
Parameters
Type | Name | Description |
---|---|---|
ITreeStringNode | node | Node. |
IsCollapsed(ITreeStringNode)
Is the specified node collapsed (or expanded)?
Declaration
bool? IsCollapsed(ITreeStringNode node)
Parameters
Type | Name | Description |
---|---|---|
ITreeStringNode | node | Node. |
Returns
Type | Description |
---|---|
System.Nullable<System.Boolean> | Null if the node is not in the tree, false if expanded, true if collapsed. |
RefreshLayout()
Forces a layout refresh for the tree (this usually should not be necessary, as the tree refreshes itself when it sees a need).
Declaration
void RefreshLayout()
Select(ITreeStringNode)
Select the specified node in the tree.
Declaration
void Select(ITreeStringNode node)
Parameters
Type | Name | Description |
---|---|---|
ITreeStringNode | node | Node. |