New to Telerik UI for WPFStart a free 30-day trial

GridViewVirtualizingPanel is used to arrange children into single line.

Definition

Namespace:Telerik.Windows.Controls.TreeView

Assembly:Telerik.Windows.Controls.Navigation.dll

Syntax:

C#
public class TreeViewPanel : VirtualizingPanel, IScrollInfo

Inheritance: objectTreeViewPanel

Implements: IScrollInfo

Constructors

Initializes a new instance of the TreeViewPanel class.

C#
public TreeViewPanel()

Fields

ChildDefaultLengthProperty

DependencyProperty

Identifies the ChildDefaultLength property.

C#
public static readonly DependencyProperty ChildDefaultLengthProperty

Called on the ItemsControl that owns this panel when an item is being re-virtualized.

C#
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.

C#
public static readonly DependencyProperty IsVirtualizingProperty

OrientationProperty

DependencyProperty

DependencyProperty for Orientation property.

C#
public static readonly DependencyProperty OrientationProperty

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.

C#
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.

C#
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.

C#
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.

C#
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.

C#
public double ChildDefaultLength { get; set; }
Remarks:

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".

C#
public double ExtentHeight { get; }

ExtentWidth contains the horizontal size of the scrolled content element in 1/96".

C#
public double ExtentWidth { get; }

This property is always false because this panel has only vertical.

C#
protected override bool HasLogicalOrientation { get; }

HorizontalOffset is the horizontal offset of the scrolled content in 1/96".

C#
public double HorizontalOffset { get; }

Determines whether the panel should cache its visual items or not. Caching improves scrolling performance but may affect memory usage.

C#
public bool IsVisualCacheEnabled { get; set; }

Orientation of the panel if its layout is in one dimension. Otherwise HasLogicalOrientation is false and LogicalOrientation should be ignored.

C#
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.

C#
public ScrollViewer ScrollOwner { get; set; }

VerticalOffset is the vertical offset of the scrolled content in 1/96".

C#
public double VerticalOffset { get; }

ViewportHeight contains the vertical size of content's visible range in 1/96" .

C#
public double ViewportHeight { get; }

ViewportWidth contains the horizontal size of content's visible range in 1/96".

C#
public double ViewportWidth { get; }

Methods

Adds a handler for the CleanUpVirtualizedItem attached event.

C#
public static void AddCleanUpVirtualizedItemHandler(DependencyObject element, CleanUpVirtualizedItemEventHandler handler)
Parameters:elementDependencyObject

DependencyObject that listens to this event.

handlerCleanUpVirtualizedItemEventHandler

Event Handler to be added.

Arranges the override.

C#
protected override Size ArrangeOverride(Size finalSize)
Parameters:finalSizeSize

Size of the arrange.

Returns:

Size

Generates the item at the specified index and calls BringIntoView on it.

C#
protected override void BringIndexIntoView(int index)
Parameters:indexint

Specify the item index that should become visible.

Exceptions:

ArgumentOutOfRangeException

Thrown if index is out of range.

Retrieves the value for IsVirtualizingProperty.

C#
public static bool GetIsVirtualizing(DependencyObject element)
Parameters:elementDependencyObject

The object on which to query the value.

Returns:

bool

True if virtualizing, false otherwise.

Retrieves the value for TreeVirtualizationModeProperty.

C#
public static VirtualizationMode GetTreeVirtualizationMode(DependencyObject element)
Parameters:elementDependencyObject

The object on which to query the value.

Returns:

VirtualizationMode

The current virtualization mode.

Retrieves the value for VirtualizationModeProperty.

C#
public static VirtualizationMode GetVirtualizationMode(DependencyObject element)
Parameters:elementDependencyObject

The object on which to query the value.

Returns:

VirtualizationMode

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.

C#
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.

C#
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.

C#
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.

C#
public virtual void LineUp()

GridViewVirtualizingPanel implementation of .

C#
public Rect MakeVisible(Visual visual, Rect rectangle)
Parameters:visualVisualrectangleRectReturns:

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.

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.

C#
protected override Size MeasureOverride(Size constraint)
Parameters:constraintSize

Constraint.

Returns:

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.

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.

C#
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.

C#
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.

C#
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.

C#
public virtual void MouseWheelUp()

Called when an item is being re-virtualized.

C#
protected virtual void OnCleanUpVirtualizedItem(CleanUpVirtualizedItemEventArgs e)
Parameters:eCleanUpVirtualizedItemEventArgs

Called when the UI collection of children is cleared by the base Panel class.

C#
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.

C#
protected override void OnGotKeyboardFocus(KeyboardFocusChangedEventArgs e)
Parameters:eKeyboardFocusChangedEventArgs

Called when the Items collection associated with the containing ItemsControl changes.

C#
protected override void OnItemsChanged(object sender, ItemsChangedEventArgs args)
Parameters:senderobject

Sender.

argsItemsChangedEventArgs

Event arguments.

Override of OnLostKeyboardFocus. Called when focus moves away from this VSP. Used by MyTreeView virtualization to keep track of the focused item.

C#
protected override void OnLostKeyboardFocus(KeyboardFocusChangedEventArgs e)
Parameters:eKeyboardFocusChangedEventArgs

Allows subclasses to be notified of changes to the viewport size data.

C#
protected virtual void OnViewportSizeChanged(Size oldViewportSize, Size newViewportSize)
Parameters:oldViewportSizeSize

The old value of the size.

newViewportSizeSize

The 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.

C#
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.

C#
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.

C#
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.

C#
public virtual void PageUp()

Removes a handler for the CleanUpVirtualizedItem attached event.

C#
public static void RemoveCleanUpVirtualizedItemHandler(DependencyObject element, CleanUpVirtualizedItemEventHandler handler)
Parameters:elementDependencyObject

DependencyObject that listens to this event.

handlerCleanUpVirtualizedItemEventHandler

Event Handler to be removed.

Set the HorizontalOffset to the passed value.

C#
public void SetHorizontalOffset(double offset)
Parameters:offsetdouble

Sets the value for IsVirtualizingProperty.

C#
public static void SetIsVirtualizing(DependencyObject element, bool value)
Parameters:elementDependencyObject

The element on which to set the value.

valuebool

True if virtualizing, false otherwise.

Sets the value for TreeVirtualizationModeProperty.

C#
public static void SetTreeVirtualizationMode(DependencyObject element, VirtualizationMode value)
Parameters:elementDependencyObject

The element on which to set the value.

valueVirtualizationMode

The desired virtualization mode.

Set the VerticalOffset to the passed value.

C#
public void SetVerticalOffset(double offset)
Parameters:offsetdouble

Sets the value for VirtualizationModeProperty.

C#
public static void SetVirtualizationMode(DependencyObject element, VirtualizationMode value)
Parameters:elementDependencyObject

The element on which to set the value.

valueVirtualizationMode

The desired virtualization mode.