Class TreeViewNodeSelectionBehavior
A behavior applicable to TreeView control allowing selection of tree nodes from code or XAML. It supports virtualized TreeView as well. (Standard WPF TreeView control doesn't support such selections and doesn't have properties for that). The behavior uses the concept of node's dynasty (a list of all node's parents in an order) to navigate through, find their corresponding TreeViewItems, expand them (to force instantiation of child TreeViewItems), and finally select the node.
Inheritance
Inherited Members
Namespace: Phoenix.Aruba.Behaviors
Assembly: Phoenix.Plugin.Aruba.dll
Syntax
public class TreeViewNodeSelectionBehavior : Behavior<TreeView>, IAnimatable, IAttachedObject
Fields
View SourceSelectedItemProperty
DependencyProperty for SelectedItem.
Declaration
public static readonly DependencyProperty SelectedItemProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
TreeNodeDynastyProviderProperty
DependencyProperty for TreeNodeDynastyProvider.
Declaration
public static readonly DependencyProperty TreeNodeDynastyProviderProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
Properties
View SourceSelectedItem
Gets or sets a currently selected node (business data object).
Declaration
public object SelectedItem { get; set; }
Property Value
Type | Description |
---|---|
object |
TreeNodeDynastyProvider
Gets or sets a provider of a tree node dynasty.
Declaration
public ITreeNodeDynastyProvider TreeNodeDynastyProvider { get; set; }
Property Value
Type | Description |
---|---|
ITreeNodeDynastyProvider |
Methods
View SourceOnAttached()
Subscribes to the event handler on TreeView's selected item changed.
Declaration
protected override void OnAttached()
Overrides
View SourceOnDetaching()
Unsubscribes from the event handler on TreeView's selected item changed.
Declaration
protected override void OnDetaching()