In This Article

TreeListBoxItem Class

Represents an item for a TreeListBox control.

[TemplateVisualState(Name = "Disabled", GroupName = "CommonStates")]
[TemplateVisualState(Name = "Normal", GroupName = "CommonStates")]
[TemplateVisualState(Name = "PointerOver", GroupName = "CommonStates")]
[TemplateVisualState(Name = "Pressed", GroupName = "CommonStates")]
[TemplateVisualState(Name = "Selected", GroupName = "CommonStates")]
[TemplateVisualState(Name = "SelectedPointerOver", GroupName = "CommonStates")]
[TemplateVisualState(Name = "SelectedPressed", GroupName = "CommonStates")]
[TemplateVisualState(Name = "SelectedUnfocused", GroupName = "CommonStates")]
[TemplateVisualState(Name = "Focused", GroupName = "FocusStates")]
[TemplateVisualState(Name = "Unfocused", GroupName = "FocusStates")]
[TemplateVisualState(Name = "Off", GroupName = "DropIndicatorAreaStates")]
[TemplateVisualState(Name = "Before", GroupName = "DropIndicatorAreaStates")]
[TemplateVisualState(Name = "On", GroupName = "DropIndicatorAreaStates")]
[TemplateVisualState(Name = "After", GroupName = "DropIndicatorAreaStates")]
public class TreeListBoxItem : ContentControl, DUCE.IResource, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IHaveResources, IQueryAmbient, IAddChild
Inheritance:
Object DispatcherObject DependencyObject Visual UIElement FrameworkElement Control ContentControl Object
Derived:
TreeListViewItem

Constructors

TreeListBoxItem()

Initializes an instance of the TreeListBoxItem class.

public TreeListBoxItem()

Properties

DefaultActionCommand

Gets or sets the ICommand to execute when this node is double-tapped or Enter is pressed while it's focused.

public ICommand DefaultActionCommand { get; set; }

Property Value

ICommand:

The ICommand to execute when this node is double-tapped or Enter is pressed while it's focused.

DropIndicatorArea

Gets a TreeItemDropArea that specifies the drop indicator to display.

public TreeItemDropArea DropIndicatorArea { get; }

Property Value

TreeItemDropArea:

The TreeItemDropArea that specifies the drop indicator to display.

IndentAmount

Gets or sets the amount that this item's content is indented.

public double IndentAmount { get; set; }

Property Value

Double:

The amount that this item's content is indented.

InnerBorderThickness

Gets or sets the Thickness of the inner border.

public Thickness InnerBorderThickness { get; set; }

Property Value

Thickness:

The Thickness of the inner border. The default value is 1.

IsExpandable

Gets or sets whether the node is capable of being expanded or collapsed.

public bool IsExpandable { get; set; }

Property Value

Boolean:

true if the node is capable of being expanded or collapsed; otherwise, false.

IsExpanded

Gets or sets whether the node is expanded.

public bool IsExpanded { get; set; }

Property Value

Boolean:

true if the node is expanded; otherwise, false.

IsSelectable

Gets or sets whether the node is capable of being selected.

public bool IsSelectable { get; set; }

Property Value

Boolean:

true if the node is capable of being selected; otherwise, false.

IsSelected

Gets or sets whether the node is selected.

public bool IsSelected { get; set; }

Property Value

Boolean:

true if the node is selected; otherwise, false.

ToggleExpansionButtonStyle

Gets or sets the Style to use for the toggle expansion button.

public Style ToggleExpansionButtonStyle { get; set; }

Property Value

Style:

The Style to use for the toggle expansion button.

TreeLineBrush

Gets or sets the Brush to use to render the tree lines.

public Brush TreeLineBrush { get; set; }

Property Value

Brush:

The Brush to use to render the tree lines.

Methods

IsLocationOverBackground(Point)

Returns whether the specified location is past the end of the content, in owner control background whitespace area.

protected virtual bool IsLocationOverBackground(Point location)
Parameter Type Description
location Point

The location to examine.

Returns

Boolean:

true if the specified location is past the end of the content, in owner control background whitespace area; otherwise, false.

OnApplyTemplate()

Invoked whenever application code or internal processes call ApplyTemplate.

public override void OnApplyTemplate()

OnContextMenuOpening(ContextMenuEventArgs)

Occurs when a context menu is requested.

protected override void OnContextMenuOpening(ContextMenuEventArgs e)
Parameter Type Description
e ContextMenuEventArgs

The ContextMenuEventArgs that contains the event data.

OnCreateAutomationPeer()

Returns an AutomationPeer object for this control instance.

protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer:

An AutomationPeer instance.

OnDoubleTapped(InputPointerButtonEventArgs)

Occurs when the item is double-tapped.

protected virtual void OnDoubleTapped(InputPointerButtonEventArgs e)
Parameter Type Description
e InputPointerButtonEventArgs

The InputPointerButtonEventArgs containing data related to this event.

OnDragEnter(DragEventArgs)

Occurs when an object is dragged inside of the control.

protected override void OnDragEnter(DragEventArgs e)
Parameter Type Description
e DragEventArgs

The DragEventArgs containing data related to this event.

OnDragLeave(DragEventArgs)

Occurs when an object is dragged outside of the control.

protected override void OnDragLeave(DragEventArgs e)
Parameter Type Description
e DragEventArgs

The DragEventArgs containing data related to this event.

OnDragOver(DragEventArgs)

Occurs when an object is dragged over the control.

protected override void OnDragOver(DragEventArgs e)
Parameter Type Description
e DragEventArgs

The DragEventArgs containing data related to this event.

OnDrop(DragEventArgs)

Occurs when an object is dropped over the control.

protected override void OnDrop(DragEventArgs e)
Parameter Type Description
e DragEventArgs

The DragEventArgs containing data related to this event.

OnGotFocus(RoutedEventArgs)

Occurs when the control gains focus.

protected override void OnGotFocus(RoutedEventArgs e)
Parameter Type Description
e RoutedEventArgs

The RoutedEventArgs that contains the event data.

OnIndentAmountChanged()

Occurs when the IndentAmount property is changed.

protected virtual void OnIndentAmountChanged()

OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs)

Reports that the IsKeyboardFocusWithin property changed.

protected override void OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs e)
Parameter Type Description
e DependencyPropertyChangedEventArgs

A DependencyPropertyChangedEventArgs that contains the event data.

OnKeyDown(KeyEventArgs)

Occurs when a key is pressed.

protected override void OnKeyDown(KeyEventArgs e)
Parameter Type Description
e KeyEventArgs

The KeyEventArgs that contains the event data.

OnLostFocus(RoutedEventArgs)

Occurs when the control loses focus.

protected override void OnLostFocus(RoutedEventArgs e)
Parameter Type Description
e RoutedEventArgs

The RoutedEventArgs that contains the event data.

OnTextInput(TextCompositionEventArgs)

Occurs when composed text is input to the control.

protected override void OnTextInput(TextCompositionEventArgs e)
Parameter Type Description
e TextCompositionEventArgs

A TextCompositionEventArgs that contains the event data.

ToString()

Returns a String that represents the current Object.

public override string ToString()

Returns

String:

A String that represents the current Object.

Fields

DefaultActionCommandProperty

Identifies the DefaultActionCommand dependency property. This field is read-only.

public static readonly DependencyProperty DefaultActionCommandProperty

DropIndicatorAreaProperty

Identifies the DropIndicatorArea dependency property. This field is read-only.

public static readonly DependencyProperty DropIndicatorAreaProperty

IndentAmountProperty

Identifies the IndentAmount dependency property. This field is read-only.

public static readonly DependencyProperty IndentAmountProperty

InnerBorderThicknessProperty

Identifies the InnerBorderThickness dependency property. This field is read-only.

public static readonly DependencyProperty InnerBorderThicknessProperty

IsExpandableProperty

Identifies the IsExpandable dependency property. This field is read-only.

public static readonly DependencyProperty IsExpandableProperty

IsExpandedProperty

Identifies the IsExpanded dependency property. This field is read-only.

public static readonly DependencyProperty IsExpandedProperty

IsSelectableProperty

Identifies the IsSelectable dependency property. This field is read-only.

public static readonly DependencyProperty IsSelectableProperty

IsSelectedProperty

Identifies the IsSelected dependency property. This field is read-only.

public static readonly DependencyProperty IsSelectedProperty

ToggleExpansionButtonStyleProperty

Identifies the ToggleExpansionButtonStyle dependency property. This field is read-only.

public static readonly DependencyProperty ToggleExpansionButtonStyleProperty

TreeLineBrushProperty

Identifies the TreeLineBrush dependency property. This field is read-only.

public static readonly DependencyProperty TreeLineBrushProperty

Inherited Members

Extension Methods