TreeViewPanel
GridViewVirtualizingPanel is used to arrange children into single line.
Definition
Namespace:Telerik.Windows.Controls.TreeView
Assembly:Telerik.Windows.Controls.Navigation.dll
Syntax:
public class TreeViewPanel : VirtualizingPanel, IScrollInfo
Inheritance: objectTreeViewPanel
Implements:
Constructors
Initializes a new instance of the TreeViewPanel class.
public TreeViewPanel()
Fields
ChildDefaultLengthProperty
DependencyProperty
Identifies the ChildDefaultLength property.
public static readonly DependencyProperty ChildDefaultLengthProperty
CleanUpVirtualizedItemEvent
RoutedEvent
Called on the ItemsControl that owns this panel when an item is being re-virtualized.
public static readonly RoutedEvent CleanUpVirtualizedItemEvent
IsVirtualizingProperty
DependencyProperty
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.
public static readonly DependencyProperty IsVirtualizingProperty
OrientationProperty
DependencyProperty
DependencyProperty for Orientation property.
public static readonly DependencyProperty OrientationProperty
TreeVirtualizationModeProperty
DependencyProperty
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.
public static readonly DependencyProperty TreeVirtualizationModeProperty
VirtualizationModeProperty
DependencyProperty
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.
public static readonly DependencyProperty VirtualizationModeProperty
Properties
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.
public bool CanHorizontallyScroll { get; set; }
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.
public bool CanVerticallyScroll { get; set; }
Gets or sets the expected length (width or height) for the items of the panel. This is a dependency property.
public double ChildDefaultLength { get; set; }
The value of this property should be as close as possible to the header height of the TreeViewItem.
ExtentHeight contains the vertical size of the scrolled content element in 1/96".
public double ExtentHeight { get; }
ExtentWidth contains the horizontal size of the scrolled content element in 1/96".
public double ExtentWidth { get; }
This property is always false because this panel has only vertical.
protected override bool HasLogicalOrientation { get; }
HorizontalOffset is the horizontal offset of the scrolled content in 1/96".
public double HorizontalOffset { get; }
Determines whether the panel should cache its visual items or not. Caching improves scrolling performance but may affect memory usage.
public bool IsVisualCacheEnabled { get; set; }
LogicalOrientation
Orientation
Orientation of the panel if its layout is in one dimension. Otherwise HasLogicalOrientation is false and LogicalOrientation should be ignored.
protected override Orientation LogicalOrientation { get; }
ScrollOwner
ScrollViewer
ScrollOwner is the container that controls any scrollbars, headers, etc... that are dependant on this IScrollInfo's properties.
public ScrollViewer ScrollOwner { get; set; }
VerticalOffset is the vertical offset of the scrolled content in 1/96".
public double VerticalOffset { get; }
ViewportHeight contains the vertical size of content's visible range in 1/96" .
public double ViewportHeight { get; }
ViewportWidth contains the horizontal size of content's visible range in 1/96".
public double ViewportWidth { get; }
Methods
Adds a handler for the CleanUpVirtualizedItem attached event.
public static void AddCleanUpVirtualizedItemHandler(DependencyObject element, CleanUpVirtualizedItemEventHandler handler)
DependencyObject that listens to this event.
handlerCleanUpVirtualizedItemEventHandlerEvent Handler to be added.
Arranges the override.
protected override Size ArrangeOverride(Size finalSize)
Size of the arrange.
Returns:Size
Generates the item at the specified index and calls BringIntoView on it.
protected override void BringIndexIntoView(int index)
Specify the item index that should become visible.
Exceptions:Thrown if index is out of range.
Retrieves the value for IsVirtualizingProperty.
public static bool GetIsVirtualizing(DependencyObject element)
The object on which to query the value.
Returns:True if virtualizing, false otherwise.
Retrieves the value for TreeVirtualizationModeProperty.
public static VirtualizationMode GetTreeVirtualizationMode(DependencyObject element)
The object on which to query the value.
Returns:The current virtualization mode.
Retrieves the value for VirtualizationModeProperty.
public static VirtualizationMode GetVirtualizationMode(DependencyObject element)
The object on which to query the value.
Returns:The current virtualization mode.
Scroll content by one line to the bottom. Subclasses can override this method and call SetVerticalOffset to change the behavior of what "line" means.
public virtual void LineDown()
Scroll content by one line to the left. Subclasses can override this method and call SetHorizontalOffset to change the behavior of what "line" means.
public virtual void LineLeft()
Scroll content by one line to the right. Subclasses can override this method and call SetHorizontalOffset to change the behavior of what "line" means.
public virtual void LineRight()
Scroll content by one line to the top. Subclasses can override this method and call SetVerticalOffset to change the behavior of what "line" means.
public virtual void LineUp()
GridViewVirtualizingPanel implementation of .
public Rect MakeVisible(Visual visual, Rect rectangle)
Rect
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.
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.
protected override Size MeasureOverride(Size constraint)
Constraint.
Returns:Size
Desired size.
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.
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.
public virtual void MouseWheelDown()
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.
public virtual void MouseWheelLeft()
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.
public virtual void MouseWheelRight()
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.
public virtual void MouseWheelUp()
Called when an item is being re-virtualized.
protected virtual void OnCleanUpVirtualizedItem(CleanUpVirtualizedItemEventArgs e)
Called when the UI collection of children is cleared by the base Panel class.
protected override void OnClearChildren()
Override of OnGotKeyboardFocus. Called when focus moves to any child or sub child of this VSP Used by MyTreeView virtualization to keep track of the focused item.
protected override void OnGotKeyboardFocus(KeyboardFocusChangedEventArgs e)
Called when the Items collection associated with the containing ItemsControl changes.
protected override void OnItemsChanged(object sender, ItemsChangedEventArgs args)
Sender.
argsItemsChangedEventArgsEvent arguments.
Override of OnLostKeyboardFocus. Called when focus moves away from this VSP. Used by MyTreeView virtualization to keep track of the focused item.
protected override void OnLostKeyboardFocus(KeyboardFocusChangedEventArgs e)
Allows subclasses to be notified of changes to the viewport size data.
protected virtual void OnViewportSizeChanged(Size oldViewportSize, Size newViewportSize)
The old value of the size.
newViewportSizeSizeThe new value of the size.
Scroll content by one page to the bottom. Subclasses can override this method and call SetVerticalOffset to change the behavior of what "page" means.
public virtual void PageDown()
Scroll content by one page to the left. Subclasses can override this method and call SetHorizontalOffset to change the behavior of what "page" means.
public virtual void PageLeft()
Scroll content by one page to the right. Subclasses can override this method and call SetHorizontalOffset to change the behavior of what "page" means.
public virtual void PageRight()
Scroll content by one page to the top. Subclasses can override this method and call SetVerticalOffset to change the behavior of what "page" means.
public virtual void PageUp()
Removes a handler for the CleanUpVirtualizedItem attached event.
public static void RemoveCleanUpVirtualizedItemHandler(DependencyObject element, CleanUpVirtualizedItemEventHandler handler)
DependencyObject that listens to this event.
handlerCleanUpVirtualizedItemEventHandlerEvent Handler to be removed.
Set the HorizontalOffset to the passed value.
Sets the value for IsVirtualizingProperty.
public static void SetIsVirtualizing(DependencyObject element, bool value)
The element on which to set the value.
valueboolTrue if virtualizing, false otherwise.
Sets the value for TreeVirtualizationModeProperty.
public static void SetTreeVirtualizationMode(DependencyObject element, VirtualizationMode value)
The element on which to set the value.
valueVirtualizationModeThe desired virtualization mode.
Set the VerticalOffset to the passed value.
Sets the value for VirtualizationModeProperty.
public static void SetVirtualizationMode(DependencyObject element, VirtualizationMode value)
The element on which to set the value.
valueVirtualizationModeThe desired virtualization mode.