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:
- System.Object System.Windows.Threading.DispatcherObject System.Windows.DependencyObject System.Windows.Media.Visual System.Windows.UIElement System.Windows.FrameworkElement System.Windows.Controls.Control System.Windows.Controls.ContentControl Object
- Derived:
- TreeListViewItem
Constructors
TreeListBoxItem()
Initializes an instance of the TreeListBoxItem class.
public TreeListBoxItem()
Properties
DefaultActionCommand
Gets or sets the System.Windows.Input.ICommand to execute when this node is double-tapped or Enter
is pressed while it's focused.
public ICommand DefaultActionCommand { get; set; }
Property Value
- System.Windows.Input.ICommand:
The System.Windows.Input.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
- System.Double:
The amount that this item's content is indented.
InnerBorderThickness
Gets or sets the System.Windows.Thickness of the inner border.
public Thickness InnerBorderThickness { get; set; }
Property Value
- System.Windows.Thickness:
The System.Windows.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
- System.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
- System.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
- System.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
- System.Boolean:
true
if the node is selected; otherwise,false
.
ToggleExpansionButtonStyle
Gets or sets the System.Windows.Style to use for the toggle expansion button.
public Style ToggleExpansionButtonStyle { get; set; }
Property Value
- System.Windows.Style:
The System.Windows.Style to use for the toggle expansion button.
TreeLineBrush
Gets or sets the System.Windows.Media.Brush to use to render the tree lines.
public Brush TreeLineBrush { get; set; }
Property Value
- System.Windows.Media.Brush:
The System.Windows.Media.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 | System.Windows.Point | The location to examine. |
Returns
- System.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 | System.Windows.Controls.ContextMenuEventArgs | The System.Windows.Controls.ContextMenuEventArgs that contains the event data. |
OnCreateAutomationPeer()
Returns an System.Windows.Automation.Peers.AutomationPeer object for this control instance.
protected override AutomationPeer OnCreateAutomationPeer()
Returns
- System.Windows.Automation.Peers.AutomationPeer:
An System.Windows.Automation.Peers.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 | System.Windows.DragEventArgs | The System.Windows.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 | System.Windows.DragEventArgs | The System.Windows.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 | System.Windows.DragEventArgs | The System.Windows.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 | System.Windows.DragEventArgs | The System.Windows.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 | System.Windows.RoutedEventArgs | The System.Windows.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 | System.Windows.DependencyPropertyChangedEventArgs | A |
OnKeyDown(KeyEventArgs)
Occurs when a key is pressed.
protected override void OnKeyDown(KeyEventArgs e)
Parameter | Type | Description |
---|---|---|
e | System.Windows.Input.KeyEventArgs | The System.Windows.Input.KeyEventArgs that contains the event data. |
OnLostFocus(RoutedEventArgs)
Occurs when the control loses focus.
protected override void OnLostFocus(RoutedEventArgs e)
Parameter | Type | Description |
---|---|---|
e | System.Windows.RoutedEventArgs | The System.Windows.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 | System.Windows.Input.TextCompositionEventArgs | A System.Windows.Input.TextCompositionEventArgs that contains the event data. |
ToString()
Returns a String
that represents the current Object
.
public override string ToString()
Returns
- System.String:
A
String
that represents the currentObject
.
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
- System.Object.Equals(System.Object)
- System.Object.Equals(System.Object, System.Object)
- System.Object.ReferenceEquals(System.Object, System.Object)
- System.Object.GetHashCode()
- System.Object.GetType()
- System.Object.MemberwiseClone()
Extension Methods
- FrameworkElementExtensions.AnimateDoubleProperty(String, Double, Double, Double, Nullable<Double>, Nullable<Double>)
- FrameworkElementExtensions.BindToProperty(DependencyProperty, Object, String, BindingMode, IValueConverter, Object)
- FrameworkElementExtensions.BindToProperty(DependencyProperty, Object, DependencyProperty, BindingMode, IValueConverter, Object)
- FrameworkElementExtensions.GetCurrentSize()