RadStackViewport
An IRadScrollViewport implementation for StackLayoutPanel-based content, where scrolling along the panel's Orientation axis is performed by item index rather than by pixel offset, while the cross axis scrolls by pixels.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class RadStackViewport : StackLayoutPanel, IDisposable, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IStylableNode, IRadScrollViewport
Inheritance: objectDisposableObjectRadObjectRadElementLayoutPanelStackLayoutPanelRadStackViewport...
Implements:
Inherited Members
Constructors
public RadStackViewport()
Methods
Scrolls the stack-orientation axis by converting the requested item index into a pixel offset, and applies the cross axis offset directly in pixels.
Returns the cached desired size of the panel's content, recalculating it if the children have changed since the last call.
Returns the number of items that are visible when the viewport is scrolled to its maximum value (the bottom for vertical stack and the right-most place for left-to-right horizontal stack). The last item must always be fully visible. If there are children the result will be at least 1.
protected virtual int GetLastFullVisibleItemsNum()
Number of full visible items in the viewport. If the items are with different sizes, the last items are used in the calculations.
Builds the scrollbar range/step parameters for both axes; the stack-orientation axis is measured in
item indices (max value equal to the number of non-collapsed children minus one) while the cross axis
is measured in pixels of extentSize.
Marks the cached extent size as stale so it is recalculated the next time GetExtentSize() is called.
public virtual void InvalidateViewport()
Implements:
protected override void OnChildrenChanged(RadElement child, ItemsChangeOperation changeOperation)
Overrides:
Clamps the scroll position so the stack-orientation axis stays within the valid item-index range and the cross axis stays within the valid pixel range for the given viewport and extent sizes.
Computes the offset, relative to currentScrollValue, required to bring
childElement fully into view; the stack-orientation component is expressed as an
item-index offset, while the cross-axis component is expressed in pixels. Returns Empty
if the element is not a direct child.
public virtual Size ScrollOffsetForChildVisible(RadElement childElement, Point currentScrollValue)
The child element that should become visible.
currentScrollValuePointThe current scroll position, used to account for the existing offset.
Returns:Implements: