[]
        
(Showing Draft Content)

C1.WPF.TreeView.C1TreeViewItem

C1TreeViewItem Class

Implements a selectable item in a C1TreeView control.

Inheritance
C1TreeViewItem
Namespace: C1.WPF.TreeView
Assembly: C1.WPF.TreeView.dll
Syntax
[TemplatePart(Name = "HeaderPanel", Type = typeof(Grid))]
[TemplatePart(Name = "Header", Type = typeof(ContentControl))]
[TemplatePart(Name = "ExpandButton", Type = typeof(ToggleButton))]
[TemplatePart(Name = "ChildrenPanel", Type = typeof(ItemsPresenter))]
[TemplatePart(Name = "HeaderPanelContainer", Type = typeof(Grid))]
[TemplatePart(Name = "MouseOverElement", Type = typeof(UIElement))]
[TemplatePart(Name = "CheckBox", Type = typeof(C1CheckBox))]
[TemplateVisualState(Name = "Expanded", GroupName = "ExpandedStatesStates")]
[TemplateVisualState(Name = "Collapsed", GroupName = "ExpandedStatesStates")]
public class C1TreeViewItem : C1HierarchicalPresenter

Constructors

Name Description
C1TreeViewItem()

Initializes a new instance of the C1TreeViewItem class.

Fields

Name Description
EditTemplateProperty

Identifies the EditTemplate dependency property.

IsCheckedProperty

Identifies the IsChecked dependency property.

IsExpandedProperty

Identifies the IsExpanded dependency property.

IsSelectedProperty

Identifies the IsSelected dependency property.

LineDashArrayProperty

Identifies the LineDashArray dependency property.

LineStrokeProperty

Identifies the LineStroke dependency property.

LineThicknessProperty

Identifies the LineThickness dependency property.

MouseOverBrushProperty

Identifies the MouseOverBrush dependency property.

SelectedBackgroundProperty

Identifies the SelectedBackground dependency property.

ShowCheckBoxProperty

Identifies the ShowCheckBox dependency property.

TextAlignmentProperty

Identifies the TextAlignment dependency property.

TextDecorationsProperty

Identifies the TextDecorations dependency property.

TextWrappingProperty

Identifies the TextWrapping dependency property.

Properties

Name Description
EditTemplate

Gets or sets the template used to edit the contents of the items.

ElementHeader

Returns the reference to the header element.

FirstNode

Gets this node's first child.

Index

Gets the index of this C1TreeViewItem in its parent items collection

IsChecked

Gets or sets whether a C1TreeViewItem checkbox control is checked.

IsExpanded

Gets or sets a value that indicates whether a C1TreeViewItem is expanded.

IsSelected

Gets or sets whether a C1TreeViewItem control is selected.

LastNode

Gets this node's last child.

LineDashArray

Gets or sets a Collection of System.Double values that indicates the pattern of dashes and gaps that is used to the connecting lines.

LineStroke

Gets or sets the brush used to paint the connecting lines.

LineThickness

Gets or sets the thickness of the connecting lines.

MouseOverBrush

Gets or sets the Brush used to highlight the control when it has the mouse over.

NextNode

Gets the next node to this one on the C1TreeView.

NextVisibleNode

Gets the next visible node to this one on the C1TreeView.

Panel

Get the panel associated with this items control.

Parent

Gets the C1TreeViewItem that is the parent of this item.

ParentItem

Gets the C1TreeViewItem that is the parent of this item.

PrevNode

Gets the previous node to this one on the C1TreeView.

PrevVisibleNode

Gets the previous visible node to this one on the C1TreeView.

SelectedBackground

Gets or sets the Brush used to highlight the control when it is selected.

ShowCheckBox

Show hide Checkbox.

TextAlignment

Gets or sets a value that indicates the horizontal alignment of text content in the Header.

TextDecorations

Gets or sets a TextDecorationCollection that contains the effects to apply to the text of the Header.

TextWrapping

Gets or sets a value that indicates how any text should be wrapped in the Header.

TreeView

Identifies the parent C1TreeView of this item.

Methods

Name Description
ArrangeOverride(Size)
ChangeVisualStateExpandedStates(bool)

Updates the current visual state of the ExpandedStates visual state group to match the object's properties.

ChangeVisualStateItemLine(bool, bool)

Updates the current visual state of the ItemLine visual state group to match the object's properties.

ChangeVisualStateShowLines(bool)

Updates the current visual state of the ShowLines visual state group to match the object's properties.

ClearContainerForItemOverride(DependencyObject, object)
Collapse()

Collapses the C1TreeViewItem.

Dispose(bool)
EnsureVisible()

Scrolls the C1TreeViewItem into view.

Expand()

Expands the C1TreeViewItem.

GetContainerForItemOverride()
IsItemItsOwnContainerOverride(object)
MeasureOverride(Size)

Called to re-measure a control.

OnApplyTemplate()
OnClick(SourcedEventArgs)

Raises the C1TreeViewItem.Click event.

OnCollapsed(SourcedEventArgs)

Raises the C1TreeViewItem.Collapsed event.

OnCollapsing(SourcedEventArgs)

Raises the C1TreeViewItem.Collapsing event.

OnExpandButtonClick()

Called when the user clicks the expand/collapse button.

OnExpanded(SourcedEventArgs)

Raises the C1TreeViewItem.Expanded event.

OnExpanding(SourcedEventArgs)

Raises the C1TreeViewItem.Expanding event.

OnHeaderChanged()

Called when the value of the Header property changes.

OnItemCleared(ItemPreparedEventArgs)

Raises the C1HierarchicalPresenter.ItemCleared event.

OnItemPrepared(ItemPreparedEventArgs)

Raises the C1HierarchicalPresenter.ItemPrepared event.

OnItemsChanged(NotifyCollectionChangedEventArgs)

Called when the Items property changes.

OnKeyDown(object, KeyEventArgs)

Called when the user presses a key, performs keyboard auto-search and node navigation.

OnMouseLeftButtonDown(MouseButtonEventArgs)
OnTapped(object, C1TappedEventArgs)

Called when the user presses the left mouse button over the item.

PrepareContainerForItemOverride(DependencyObject, object)

Events

Name Description
Click

Occurs when the C1TreeViewItem is clicked.

Collapsed

Occurs after the C1TreeViewItem is collapsed.

Collapsing

Occurs before the C1TreeViewItem is collapsed.

Expanded

Occurs after the C1TreeViewItem is expanded.

Expanding

Occurs before the C1TreeViewItem is expanded.

IsExpandedChanged

Event raised when the IsExpanded property has changed.