Class IntegralScrollWrapPanel
A specialized wrap layout panel that provides integral scrolling capabilities with precise line-based navigation.
Inheritance
Inherited Members
Namespace: Telerik.WinControls.Layout
Assembly: Telerik.WinControls.dll
Syntax
public class IntegralScrollWrapPanel : WrapLayoutPanel, IDisposable, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IStylableNode
Remarks
IntegralScrollWrapPanel extends WrapLayoutPanel to add sophisticated scrolling functionality where content is arranged in discrete lines that can be scrolled as complete units. This ensures that elements are always fully visible rather than being partially clipped during scrolling operations.
Key features include:
- Line-based scrolling that maintains element integrity and visibility
- Configurable maximum rows and columns for controlling visible content area
- Current line tracking for precise scroll position management
- Element-specific scrolling to bring individual items into view
- Automatic line counting and layout metrics calculation
- Clipped drawing to prevent content overflow beyond boundaries
This layout panel is commonly used in gallery controls, ribbon interfaces, toolboxes, and any scenario where a large collection of items needs to be displayed in a scrollable grid with smooth, predictable navigation. The integral scrolling ensures optimal user experience by preventing partial visibility of elements.
Constructors
IntegralScrollWrapPanel()
Declaration
public IntegralScrollWrapPanel()
Properties
CurrentLine
which is the current line
Declaration
public int CurrentLine { get; }
Property Value
System.Int32
|
LineCount
Gets the total number of lines in the layout after the most recent measurement pass.
Declaration
public int LineCount { get; }
Property Value
System.Int32
An integer representing the total number of lines required to display all child elements, or -1 if the layout has not been measured yet. |
Remarks
This property is calculated during the layout measurement process and reflects the total number of horizontal or vertical lines (depending on orientation) needed to accommodate all child elements within the current layout constraints.
The line count is essential for implementing scrolling logic and determining the scroll range for the panel. It's automatically updated whenever the layout is invalidated and re-measured.
MaxColumns
Gets or sets the maximum number of columns that should be displayed in the visible area of the panel.
Declaration
public int MaxColumns { get; set; }
Property Value
System.Int32
An integer representing the maximum number of columns to display. The default value is System.Int32.MaxValue. |
Remarks
This property controls the horizontal constraint for the layout, determining how many columns of elements can be displayed before wrapping to a new line. When combined with MaxRows, it defines the visible viewport for the content.
Setting this property triggers layout invalidation and forces a complete re-measurement and arrangement of all child elements. The control is also invalidated to ensure visual consistency.
This is particularly useful in gallery and grid scenarios where you want to control the number of items visible horizontally while allowing vertical scrolling through additional rows.
MaxRows
Gets or sets the maximum number of rows that should be displayed in the visible area of the panel.
Declaration
public int MaxRows { get; set; }
Property Value
System.Int32
An integer representing the maximum number of rows to display. The default value is 2. |
Remarks
This property controls the vertical constraint for the layout, determining how many rows of elements can be displayed simultaneously. When combined with MaxColumns, it defines the visible viewport dimensions for the content.
Setting this property triggers layout invalidation and forces a complete re-measurement and arrangement of all child elements. The control is also invalidated to ensure visual consistency.
This is essential for implementing scrollable galleries and grids where you want to limit the vertical space while providing horizontal scrolling or navigation through additional content.
Methods
ArrangeOverride(SizeF)
Declaration
protected override SizeF ArrangeOverride(SizeF finalSize)
Parameters
System.Drawing.SizeF
finalSize
|
Returns
System.Drawing.SizeF
|
Overrides
InitializeFields()
MeasureOverride(SizeF)
Declaration
protected override SizeF MeasureOverride(SizeF availableSize)
Parameters
System.Drawing.SizeF
availableSize
|
Returns
System.Drawing.SizeF
|
Overrides
ScrollToElement(RadElement)
Scroll to element
Declaration
public void ScrollToElement(RadElement scrollElement)
Parameters
RadElement
scrollElement
|
ScrollToLine(Int32)
scrol to line
Declaration
public void ScrollToLine(int lineNumber)
Parameters
System.Int32
lineNumber
line index to scrool - zero besed |