Class TreeViewPanel
GridViewVirtualizingPanel is used to arrange children into single line.
Inheritance
Namespace: Telerik.Windows.Controls.TreeView
Assembly: Telerik.Windows.Controls.Navigation.dll
Syntax
public class TreeViewPanel : VirtualizingPanel, IScrollInfo
Constructors
TreeViewPanel()
Initializes a new instance of the TreeViewPanel class.
Declaration
public TreeViewPanel()
Fields
ChildDefaultLengthProperty
Identifies the ChildDefaultLength property.
Declaration
public static readonly DependencyProperty ChildDefaultLengthProperty
Field Value
System.Windows.DependencyProperty
|
CleanUpVirtualizedItemEvent
Called on the ItemsControl that owns this panel when an item is being re-virtualized.
Declaration
public static readonly RoutedEvent CleanUpVirtualizedItemEvent
Field Value
RoutedEvent
|
IsVirtualizingProperty
Attached property for use on the ItemsControl that is the host for the items being presented by this panel. Use this property to turn virtualization on/off.
Declaration
public static readonly DependencyProperty IsVirtualizingProperty
Field Value
System.Windows.DependencyProperty
|
OrientationProperty
DependencyProperty for System.Windows.Controls.Orientation property.
Declaration
public static readonly DependencyProperty OrientationProperty
Field Value
System.Windows.DependencyProperty
|
TreeVirtualizationModeProperty
Attached property for use on the ItemsControl that is the host for the items being presented by this panel. Use this property to modify the virtualization mode. Note that this property can only be set before the panel has been initialized.
Declaration
public static readonly DependencyProperty TreeVirtualizationModeProperty
Field Value
System.Windows.DependencyProperty
|
VirtualizationModeProperty
Attached property for use on the ItemsControl that is the host for the items being presented by this panel. Use this property to modify the virtualization mode.
Note that this property can only be set before the panel has been initialized.
Declaration
public static readonly DependencyProperty VirtualizationModeProperty
Field Value
System.Windows.DependencyProperty
|
Properties
CanHorizontallyScroll
GridViewVirtualizingPanel reacts to this property by changing its child measurement algorithm. If scrolling in a dimension, infinite space is allowed the child; otherwise, available size is preserved.
Declaration
public bool CanHorizontallyScroll { get; set; }
Property Value
System.Boolean
|
CanVerticallyScroll
GridViewVirtualizingPanel reacts to this property by changing its child measurement algorithm. If scrolling in a dimension, infinite space is allowed the child; otherwise, available size is preserved.
Declaration
public bool CanVerticallyScroll { get; set; }
Property Value
System.Boolean
|
ChildDefaultLength
Gets or sets the expected length (width or height) for the items of the panel. This is a dependency property.
Declaration
public double ChildDefaultLength { get; set; }
Property Value
System.Double
|
Remarks
The value of this property should be as close as possible to the header height of the TreeViewItem.
ExtentHeight
ExtentHeight contains the vertical size of the scrolled content element in 1/96".
Declaration
public double ExtentHeight { get; }
Property Value
System.Double
|
ExtentWidth
ExtentWidth contains the horizontal size of the scrolled content element in 1/96".
Declaration
public double ExtentWidth { get; }
Property Value
System.Double
|
HorizontalOffset
HorizontalOffset is the horizontal offset of the scrolled content in 1/96".
Declaration
public double HorizontalOffset { get; }
Property Value
System.Double
|
IsVisualCacheEnabled
Determines whether the panel should cache its visual items or not. Caching improves scrolling performance but may affect memory usage.
Declaration
public bool IsVisualCacheEnabled { get; set; }
Property Value
System.Boolean
|
ScrollOwner
ScrollOwner is the container that controls any scrollbars, headers, etc... that are dependant on this IScrollInfo's properties.
Declaration
public ScrollViewer ScrollOwner { get; set; }
Property Value
System.Windows.Controls.ScrollViewer
|
VerticalOffset
VerticalOffset is the vertical offset of the scrolled content in 1/96".
Declaration
public double VerticalOffset { get; }
Property Value
System.Double
|
ViewportHeight
ViewportHeight contains the vertical size of content's visible range in 1/96" .
Declaration
public double ViewportHeight { get; }
Property Value
System.Double
|
ViewportWidth
ViewportWidth contains the horizontal size of content's visible range in 1/96".
Declaration
public double ViewportWidth { get; }
Property Value
System.Double
|
Methods
AddCleanUpVirtualizedItemHandler(DependencyObject, CleanUpVirtualizedItemEventHandler)
Adds a handler for the CleanUpVirtualizedItem attached event.
Declaration
public static void AddCleanUpVirtualizedItemHandler(DependencyObject element, CleanUpVirtualizedItemEventHandler handler)
Parameters
System.Windows.DependencyObject
element
DependencyObject that listens to this event. |
CleanUpVirtualizedItemEventHandler
handler
Event Handler to be added. |
ArrangeOverride(Size)
Arranges the override.
Declaration
protected override Size ArrangeOverride(Size finalSize)
Parameters
System.Windows.Size
finalSize
Size of the arrange. |
Returns
System.Windows.Size
|
BringIndexIntoView(Int32)
Generates the item at the specified index and calls BringIntoView on it.
Declaration
protected override void BringIndexIntoView(int index)
Parameters
System.Int32
index
Specify the item index that should become visible. |
Exceptions
System.ArgumentOutOfRangeException
Thrown if index is out of range. |
GetIsVirtualizing(DependencyObject)
Retrieves the value for IsVirtualizingProperty.
Declaration
public static bool GetIsVirtualizing(DependencyObject element)
Parameters
System.Windows.DependencyObject
element
The object on which to query the value. |
Returns
System.Boolean
True if virtualizing, false otherwise. |
GetTreeVirtualizationMode(DependencyObject)
Retrieves the value for TreeVirtualizationModeProperty.
Declaration
public static VirtualizationMode GetTreeVirtualizationMode(DependencyObject element)
Parameters
System.Windows.DependencyObject
element
The object on which to query the value. |
Returns
VirtualizationMode
The current virtualization mode. |
GetVirtualizationMode(DependencyObject)
Retrieves the value for VirtualizationModeProperty.
Declaration
public static VirtualizationMode GetVirtualizationMode(DependencyObject element)
Parameters
System.Windows.DependencyObject
element
The object on which to query the value. |
Returns
VirtualizationMode
The current virtualization mode. |
LineDown()
Scroll content by one line to the bottom. Subclasses can override this method and call SetVerticalOffset to change the behavior of what "line" means.
Declaration
public virtual void LineDown()
LineLeft()
Scroll content by one line to the left. Subclasses can override this method and call SetHorizontalOffset to change the behavior of what "line" means.
Declaration
public virtual void LineLeft()
LineRight()
Scroll content by one line to the right. Subclasses can override this method and call SetHorizontalOffset to change the behavior of what "line" means.
Declaration
public virtual void LineRight()
LineUp()
Scroll content by one line to the top. Subclasses can override this method and call SetVerticalOffset to change the behavior of what "line" means.
Declaration
public virtual void LineUp()
MakeVisible(UIElement, Rect)
GridViewVirtualizingPanel implementation of System.Windows.Controls.Primitives.IScrollInfo.MakeVisible(System.Windows.UIElement,System.Windows.Rect).
Declaration
public Rect MakeVisible(UIElement visual, Rect rectangle)
Parameters
System.Windows.UIElement
visual
|
System.Windows.Rect
rectangle
|
Returns
System.Windows.Rect
|
Remarks
The goal is to change offsets to bring the child into view, and return a rectangle in our space to make visible. The rectangle we return is in the physical dimension the input target rect transformed into our pace. In the logical dimension, it is our immediate child's rect.
MeasureOverride(Size)
General GridViewVirtualizingPanel layout behavior is to grow unbounded in the "stacking" direction (Size To Content). Children in this dimension are encouraged to be as large as they like. In the other dimension, GridViewVirtualizingPanel will assume the maximum size of its children.
Declaration
protected override Size MeasureOverride(Size constraint)
Parameters
System.Windows.Size
constraint
Constraint. |
Returns
System.Windows.Size
Desired size. |
Remarks
When scrolling, GridViewVirtualizingPanel will not grow in layout size but effectively add the children on a z-plane which will probably be clipped by some parent (typically a ScrollContentPresenter) to Stack's size.
MouseWheelDown()
Scroll content by one page to the bottom. Subclasses can override this method and call SetVerticalOffset to change the behavior of the mouse wheel increment.
Declaration
public virtual void MouseWheelDown()
MouseWheelLeft()
Scroll content by one page to the left. Subclasses can override this method and call SetHorizontalOffset to change the behavior of the mouse wheel increment.
Declaration
public virtual void MouseWheelLeft()
MouseWheelRight()
Scroll content by one page to the right. Subclasses can override this method and call SetHorizontalOffset to change the behavior of the mouse wheel increment.
Declaration
public virtual void MouseWheelRight()
MouseWheelUp()
Scroll content by one page to the top. Subclasses can override this method and call SetVerticalOffset to change the behavior of the mouse wheel increment.
Declaration
public virtual void MouseWheelUp()
OnCleanUpVirtualizedItem(CleanUpVirtualizedItemEventArgs)
Called when an item is being re-virtualized.
Declaration
protected virtual void OnCleanUpVirtualizedItem(CleanUpVirtualizedItemEventArgs e)
Parameters
CleanUpVirtualizedItemEventArgs
e
|
OnClearChildren()
Called when the UI collection of children is cleared by the base Panel class.
Declaration
protected override void OnClearChildren()
OnItemsChanged(Object, ItemsChangedEventArgs)
Called when the Items collection associated with the containing ItemsControl changes.
Declaration
protected override void OnItemsChanged(object sender, ItemsChangedEventArgs args)
Parameters
System.Object
sender
Sender. |
System.Windows.Controls.Primitives.ItemsChangedEventArgs
args
Event arguments. |
OnViewportSizeChanged(Size, Size)
Allows subclasses to be notified of changes to the viewport size data.
Declaration
protected virtual void OnViewportSizeChanged(Size oldViewportSize, Size newViewportSize)
Parameters
System.Windows.Size
oldViewportSize
The old value of the size. |
System.Windows.Size
newViewportSize
The new value of the size. |
PageDown()
Scroll content by one page to the bottom. Subclasses can override this method and call SetVerticalOffset to change the behavior of what "page" means.
Declaration
public virtual void PageDown()
PageLeft()
Scroll content by one page to the left. Subclasses can override this method and call SetHorizontalOffset to change the behavior of what "page" means.
Declaration
public virtual void PageLeft()
PageRight()
Scroll content by one page to the right. Subclasses can override this method and call SetHorizontalOffset to change the behavior of what "page" means.
Declaration
public virtual void PageRight()
PageUp()
Scroll content by one page to the top. Subclasses can override this method and call SetVerticalOffset to change the behavior of what "page" means.
Declaration
public virtual void PageUp()
RemoveCleanUpVirtualizedItemHandler(DependencyObject, CleanUpVirtualizedItemEventHandler)
Removes a handler for the CleanUpVirtualizedItem attached event.
Declaration
public static void RemoveCleanUpVirtualizedItemHandler(DependencyObject element, CleanUpVirtualizedItemEventHandler handler)
Parameters
System.Windows.DependencyObject
element
DependencyObject that listens to this event. |
CleanUpVirtualizedItemEventHandler
handler
Event Handler to be removed. |
SetHorizontalOffset(Double)
Set the HorizontalOffset to the passed value.
Declaration
public void SetHorizontalOffset(double offset)
Parameters
System.Double
offset
|
SetIsVirtualizing(DependencyObject, Boolean)
Sets the value for IsVirtualizingProperty.
Declaration
public static void SetIsVirtualizing(DependencyObject element, bool value)
Parameters
System.Windows.DependencyObject
element
The element on which to set the value. |
System.Boolean
value
True if virtualizing, false otherwise. |
SetTreeVirtualizationMode(DependencyObject, VirtualizationMode)
Sets the value for TreeVirtualizationModeProperty.
Declaration
public static void SetTreeVirtualizationMode(DependencyObject element, VirtualizationMode value)
Parameters
System.Windows.DependencyObject
element
The element on which to set the value. |
VirtualizationMode
value
The desired virtualization mode. |
SetVerticalOffset(Double)
Set the VerticalOffset to the passed value.
Declaration
public void SetVerticalOffset(double offset)
Parameters
System.Double
offset
|
SetVirtualizationMode(DependencyObject, VirtualizationMode)
Sets the value for VirtualizationModeProperty.
Declaration
public static void SetVirtualizationMode(DependencyObject element, VirtualizationMode value)
Parameters
System.Windows.DependencyObject
element
The element on which to set the value. |
VirtualizationMode
value
The desired virtualization mode. |