An adapter that can provide an item's hierarchy and visual state data for usage in a Tree
- Inheritance:
- object object
Constructors
TreeListBoxItemAdapter()
Initializes an instance of the class.
Properties
ChildrenBinding
Gets or sets a Binding that can be used to retrieve an IEnumerable of child items.
Property Value
Remarks
When this property is set, it will be used within the default implementation of the Get
ChildrenPath
Gets or sets the resolved item property name for which to monitor INotify
Property Value
- string:
The name of the property to monitor.
ChildrenQueryModeDefault
Gets or sets a default Get
Property Value
- Tree
Item :Children Query Mode A Tree
Item indicating the children query mode. The default value isChildren Query Mode OnDisplay
.
Remarks
This value is returned by Get
DefaultActionCommandBinding
Gets or sets a Binding that can retrieve the default action command.
Property Value
Remarks
When this property is set, it will be used within the default implementation of the Get
ExpandabilityDefault
Gets or sets a default Get
Property Value
- Tree
Item :Expandability A Tree
Item indicating the expandability. The default value isExpandability Auto
.
Remarks
This value is returned by Get
IsDraggableBinding
Gets or sets a Binding that determines whether an item is draggable.
Property Value
Remarks
When this property is set, it will be used within the default implementation of the Get
IsEditableBinding
Gets or sets a Binding that determines whether an item is editable.
Property Value
Remarks
When this property is set, it will be used within the default implementation of the Get
IsEditableDefault
Gets or sets a default Get
Property Value
- bool:
true
if all items should be editable; otherwise,false
. The default value isfalse
.
Remarks
This value is returned by Gettrue
to allow all items to be editable.
Note that an Is
IsEditingBinding
Gets or sets a Binding that determines whether an item is currently being edited.
Property Value
Remarks
When this property is set, it will be used within the default implementation of the Get
IsEditingPath
Gets or sets the item property name for which to monitor INotify
Property Value
- string:
The name of the property to monitor.
IsExpandedBinding
Gets or sets a Binding that determines whether an item should be expanded.
Property Value
Remarks
When this property is set, it will be used within the default implementation of the Get
IsExpandedDefault
Gets or sets a default Get
Property Value
- bool:
true
if all items should be initially expanded; otherwise,false
. The default value isfalse
.
Remarks
This value is returned by Gettrue
to always fully expand a tree.
Note that an Is
IsExpandedPath
Gets or sets the item property name for which to monitor INotify
Property Value
- string:
The name of the property to monitor.
IsLoadingBinding
Gets or sets a Binding that determines whether an item is currently loading children asynchronously.
Property Value
Remarks
When this property is set, it will be used within the default implementation of the Get
IsLoadingPath
Gets or sets the item property name for which to monitor INotify
Property Value
- string:
The name of the property to monitor.
IsSelectableBinding
Gets or sets a Binding that determines whether an item is capable of being selected.
Property Value
Remarks
When this property is set, it will be used within the default implementation of the Get
IsSelectablePath
Gets or sets the item property name for which to monitor INotify
Property Value
- string:
The name of the property to monitor.
IsSelectedBinding
Gets or sets a Binding that determines whether an item should be selected.
Property Value
Remarks
When this property is set, it will be used within the default implementation of the Get
IsSelectedPath
Gets or sets the item property name for which to monitor INotify
Property Value
- string:
The name of the property to monitor.
PathBinding
Gets or sets a Binding that can retrieve the path of an item, relative to its parent.
Property Value
Remarks
When this property is set, it will be used within the default implementation of the Get
SearchTextBinding
Gets or sets a Binding that can retrieve the search text of an item.
Property Value
Remarks
When this property is set, it will be used within the default implementation of the Get
TopLevelExpandabilityDefault
Gets or sets a default Get
Property Value
- Tree
Item :Expandability A Tree
Item indicating the expandability. The default value isExpandability Auto
, meaning fall back to the ExpandabilityDefault value.
Remarks
This value is returned by Get
Methods
CanHaveChildren(TreeListBox, object)
Returns whether the specified item is capable of having child items.
Parameter | Type | Description |
---|---|---|
ownerControl | Tree |
The owner control. |
item | object | The item to examine. |
Returns
- bool:
true
if the specified item is capable of having child items; otherwise,false
.
Remarks
The default implementation of this method returns true
.
This method should only return false
if an item is not capable of having child items and is always a 'leaf' node in the tree.
It should not return false
if the item can have child items, but doesn't at the current time.
Optimizations are in place to not call Gettrue
.
This method should be overridden if On
CreateVirtualPlaceholder(TreeListBox, object, int)
Creates a virtual placeholder for an item's child at the specified index, when data virtualization is enabled.
Parameter | Type | Description |
---|---|---|
ownerControl | Tree |
The owner control. |
parentItem | object | The parent item. |
index | int | The index of the child. |
Returns
- ITree
Item :Virtual Placeholder The ITree
Item that was created.Virtual Placeholder
Filter(TreeListBox, object)
Examines the specified item to see if meets active filter conditions.
Parameter | Type | Description |
---|---|---|
ownerControl | Tree |
The owner control. |
item | object | The item to examine. |
Returns
- Data
Filter :Result A Data
Filter that indicates the filter result.Result
Remarks
The default implementation of this method uses the DataIncluded
.
GetAbsolutePath(TreeListBox, object)
Returns the item's absolute (rooted) string path, if known from the item itself.
Parameter | Type | Description |
---|---|---|
ownerControl | Tree |
The owner control. |
item | object | The item to examine. |
Returns
- string:
The item's absolute (rooted) string path, if known.
Remarks
The absolute path can be used to improve performance when searching for an item in a large tree since it allows for a path-based search instead of an exhaustive breadth-first search through the tree. A null string should be returned for items that don't know their absolute path.
GetChildren(TreeListBox, object)
Returns an IEnumerable that will be used to provide child items for the specified parent item.
Parameter | Type | Description |
---|---|---|
ownerControl | Tree |
The owner control. |
item | object | The item to examine. |
Returns
- IEnumerable:
An IEnumerable that will be used to provide child items for the specified parent item.
Remarks
The Children
GetChildrenQueryMode(TreeListBox, object)
Returns the children query mode of the specified item.
Parameter | Type | Description |
---|---|---|
ownerControl | Tree |
The owner control. |
item | object | The item to examine. |
Returns
- Tree
Item :Children Query Mode A Tree
Item indicating the children query mode.Children Query Mode
Remarks
The default implementation of this method returns the Children
GetDefaultActionCommand(TreeListBox, object)
Returns the default action command.
Parameter | Type | Description |
---|---|---|
ownerControl | Tree |
The owner control. |
item | object | The item to examine. |
Returns
Remarks
The Default
GetExpandability(TreeListBox, object, int)
Returns the expandability of the specified item.
Parameter | Type | Description |
---|---|---|
ownerControl | Tree |
The owner control. |
item | object | The item to examine. |
depth | int | The item depth. |
Returns
- Tree
Item :Expandability A Tree
Item indicating the expandability.Expandability
Remarks
The default implementation of this method examines the TopAuto
, or if the item isn't top-level, the Expandability
GetIndentAmount(TreeListBox, object, int)
Returns the indent amount of the specified item.
Parameter | Type | Description |
---|---|---|
ownerControl | Tree |
The owner control. |
item | object | The item to examine. |
depth | int | The item depth. |
Returns
- double:
The indent amount.
GetIsDraggable(TreeListBox, object)
Returns whether the specified item is draggable.
Parameter | Type | Description |
---|---|---|
ownerControl | Tree |
The owner control. |
item | object | The item to examine. |
Returns
- bool:
true
if the specified item is draggable; otherwise,false
.
Remarks
The Is
GetIsEditable(TreeListBox, object)
Returns whether the specified item is editable.
Parameter | Type | Description |
---|---|---|
ownerControl | Tree |
The owner control. |
item | object | The item to examine. |
Returns
- bool:
true
if the specified item is editable; otherwise,false
.
Remarks
The Is
GetIsEditing(TreeListBox, object)
Returns whether the specified item is currently being edited.
Parameter | Type | Description |
---|---|---|
ownerControl | Tree |
The owner control. |
item | object | The item to examine. |
Returns
- bool:
true
if the specified item is currently being edited; otherwise,false
.
Remarks
The Is
GetIsExpanded(TreeListBox, object)
Returns whether the specified item is expanded.
Parameter | Type | Description |
---|---|---|
ownerControl | Tree |
The owner control. |
item | object | The item to examine. |
Returns
- bool:
true
if the specified item is expanded; otherwise,false
.
Remarks
The Is
GetIsLoading(TreeListBox, object)
Returns whether the specified item is currently loading children asynchronously.
Parameter | Type | Description |
---|---|---|
ownerControl | Tree |
The owner control. |
item | object | The item to examine. |
Returns
- bool:
true
if the specified item is currently loading children asynchronously; otherwise,false
.
Remarks
The Is
GetIsSelectable(TreeListBox, object)
Returns whether the specified item is capable of being selected.
Parameter | Type | Description |
---|---|---|
ownerControl | Tree |
The owner control. |
item | object | The item to examine. |
Returns
- bool:
true
if the specified item is capable of being selected; otherwise,false
.
Remarks
The Is
GetIsSelected(TreeListBox, object)
Returns whether the specified item is selected.
Parameter | Type | Description |
---|---|---|
ownerControl | Tree |
The owner control. |
item | object | The item to examine. |
Returns
- bool:
true
if the specified item is selected; otherwise,false
.
Remarks
The Is
GetPath(TreeListBox, object)
Returns the item's string path, relative to its parent.
Parameter | Type | Description |
---|---|---|
ownerControl | Tree |
The owner control. |
item | object | The item to examine. |
Returns
- string:
The item's string path, relative to its parent.
Remarks
The Path
GetSearchText(TreeListBox, object)
Returns the item's text by which to match when searching.
Parameter | Type | Description |
---|---|---|
ownerControl | Tree |
The owner control. |
item | object | The item to examine. |
Returns
- string:
The item's string search text.
Remarks
The Search
InitializeDataObject(TreeListBox, IDataObject, IEnumerable<object>)
Initializes a IData
Parameter | Type | Description |
---|---|---|
sourceControl | Tree |
The source control that contains the items. |
dataObject | IData |
The IData |
items | IEnumerable<object> | The items to examine. |
Returns
- Drag
Drop :Effects The Drag
Drop that specifies the allowed drag/drop effects for the IDataEffects Object .
Remarks
The default implementation of this method simply return DragDropEffects.None
.
Override this method to initialize the IDataDragDropEffects
result.
OnDragComplete(InputPointerEventArgs, TreeListBox, DataObject, DragDropEffects)
Notifies that a drag event from the source control has completed.
Parameter | Type | Description |
---|---|---|
e | Input |
The Input |
sourceControl | Tree |
The source control, from which the drag occurred. |
dataObject | Data |
The data object with information about what was dragged. |
effect | Drag |
The drop effect. |
Remarks
The default implementation of this method does nothing. This method can be overridden in scenarios where a custom adorner needs to be rendered near the pointer as the items are dragged, and the adorner should be removed.
OnDragHover(DragEventArgs, TreeListBox, object)
Notifies that a drag event hovered over a target item, returning whether the target item can be expanded when appropriate.
Parameter | Type | Description |
---|---|---|
e | Drag |
The Drag |
targetControl | Tree |
The target control, over which the event occurred. |
targetItem | object | The target item. |
Returns
- Tree
Item :Expandability A Tree
Item that indicates if the target item should expand.Expandability
OnDragOver(DragEventArgs, TreeListBox, object, TreeItemDropArea)
Notifies that a drag event occurred over a target item, requests that appropriate updates are made to the supplied DragEventArgs
,
and requests that the allowed drop area is returned for visual target feedback.
Parameter | Type | Description |
---|---|---|
e | Drag |
The Drag |
targetControl | Tree |
The target control, over which the event occurred. |
targetItem | object | The target item, which could be |
dropArea | Tree |
A Tree |
Returns
- Tree
Item :Drop Area A Tree
Item indicating the allowed drop area, which will be used for visual feedback to the end user. ReturnDrop Area TreeItemDropArea.None
for no visual feedback.
Remarks
The default implementation of this method sets the e.Effects
to DragDropEffects.None
and returns that no drop area is allowed.
Override this method if you wish to support dropping and add logic to properly handle the dragged data.
OnDragStart(InputPointerEventArgs, TreeListBox, DataObject, DragDropEffects)
Notifies that a drag event is about to originate from the source control.
Parameter | Type | Description |
---|---|---|
e | Input |
The Input |
sourceControl | Tree |
The source control, from which the drag will take place. |
dataObject | Data |
The data object with information about what will be dragged. |
allowedEffects | Drag |
The allowed effects. |
Remarks
The default implementation of this method does nothing. This method can be overridden in scenarios where a custom adorner needs to be rendered near the pointer as the items are dragged, and the adorner should be created.
OnDrop(DragEventArgs, TreeListBox, object, TreeItemDropArea)
Notifies that a drop event occurred over a target item and requests that appropriate updates are made to the supplied DragEventArgs
.
Parameter | Type | Description |
---|---|---|
e | Drag |
The Drag |
targetControl | Tree |
The target control, over which the event occurred. |
targetItem | object | The target item, which could be |
dropArea | Tree |
A Tree |
Remarks
The default implementation of this method sets the e.Effects
to DragDropEffects.None
and takes no further action.
Override this method if you wish to support dropping and add logic to properly handle the dragged data.
SetIsEditing(TreeListBox, object, bool)
Sets whether the specified item is currently being edited.
Parameter | Type | Description |
---|---|---|
ownerControl | Tree |
The owner control. |
item | object | The item to update. |
value | bool | The new value. |
Remarks
The Is
SetIsExpanded(TreeListBox, object, bool)
Sets whether the specified item is expanded.
Parameter | Type | Description |
---|---|---|
ownerControl | Tree |
The owner control. |
item | object | The item to update. |
value | bool | The new value. |
Remarks
The Is
SetIsSelected(TreeListBox, object, bool)
Sets whether the specified item is selected.
Parameter | Type | Description |
---|---|---|
ownerControl | Tree |
The owner control. |
item | object | The item to update. |
value | bool | The new value. |
Remarks
The Is