ClassRadScrollLayoutPanel
RadScrollLayoutPanel is the layout panel that arranges viewport, horizontal and vertical scrollbars and a spot that appears when both scrollbars are shown.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class RadScrollLayoutPanel : LayoutPanel, IDisposable, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IStylableNode
Inheritance: objectDisposableObjectRadObjectRadElementLayoutPanelRadScrollLayoutPanel
Implements:
Inherited Members
Constructors
RadScrollLayoutPanel()
Declaration
public RadScrollLayoutPanel()
RadScrollLayoutPanel(RadElement)
Declaration
public RadScrollLayoutPanel(RadElement viewport)
Parameters
viewport
RadScrollLayoutPanel(RadElement, int)
Declaration
public RadScrollLayoutPanel(RadElement viewport, int initialScrollThickness)
Parameters
viewport
initialScrollThickness
Fields
ForceViewportHeightProperty
Declaration
public static readonly RadProperty ForceViewportHeightProperty
Field Value
ForceViewportWidthProperty
Declaration
public static readonly RadProperty ForceViewportWidthProperty
Field Value
ScrollThicknessProperty
Declaration
public static readonly RadProperty ScrollThicknessProperty
Field Value
Properties
BlankSpot
Gets the rectangle that is between the two scrollbars when they both are shown.
CanHorizontalScroll
Gets a value indicating whether can be performed horizontal scrolling operation
Declaration
[Browsable(false)]
public bool CanHorizontalScroll { get; }
Property Value
CanVerticalScroll
Gets a value indicating whether can be performed vertical scrolling operation
Declaration
[Browsable(false)]
public bool CanVerticalScroll { get; }
Property Value
ForceViewportHeight
Declaration
[Browsable(false)]
public bool ForceViewportHeight { get; set; }
Property Value
ForceViewportWidth
Declaration
[Browsable(false)]
public bool ForceViewportWidth { get; set; }
Property Value
HorizontalScrollBar
Gets the horizontal scrollbar
Declaration
public RadScrollBarElement HorizontalScrollBar { get; }
Property Value
HorizontalScrollState
Gets or sets the scroll state of the horizontal scroll bar.
Declaration
public ScrollState HorizontalScrollState { get; set; }
Property Value
State of type ScrollState. Default value is AutoHide.
MaxValue
Gets the maximum possible scrolling position.
Declaration
[Browsable(true)]
public Point MaxValue { get; set; }
Property Value
Point which contains maximum values for scrolling in horizontal and vertical direction.
MinValue
Gets the minimum possible scrolling position.
Declaration
[Browsable(true)]
public Point MinValue { get; set; }
Property Value
Point which contains minimum values for scrolling in horizontal and vertical direction.
PixelsPerLineScroll
Gets or sets the number of pixels to use when performing Line Up/Down/Left/Right scrolling operation.
Still the scrolling position can be set with one pixel accuracy if the scroll bar thumb is dragged.
Declaration
[Browsable(true)]
public Point PixelsPerLineScroll { get; set; }
Property Value
ScrollThickness
Gets or sets the thickness of the scrollbar.
Declaration
[Browsable(true)]
public int ScrollThickness { get; set; }
Property Value
UsePhysicalScrolling
Gets or sets a value indicating whether physical or logical scrolling will be used.
Declaration
[Browsable(true)]
public bool UsePhysicalScrolling { get; set; }
Property Value
Boolean value: when it is false logical scrolling will be used.
Remarks
This property cannot be set to false if Viewport does not implement IRadScrollViewport.
Default value is true for ordinary viewports and false for viewports that implement IRadScrollViewport.
Value
Declaration
[Browsable(true)]
public Point Value { get; set; }
Property Value
Point which contains the current scrolling position in horizontal and vertical direction.
VerticalScrollBar
Gets the vertical scrollbar
Declaration
public RadScrollBarElement VerticalScrollBar { get; }
Property Value
VerticalScrollState
Gets or sets the scroll state of the vertical scroll bar.
Declaration
public ScrollState VerticalScrollState { get; set; }
Property Value
State of type ScrollState. Default value is AutoHide.
Viewport
Gets or sets the element which content will be scrolled if the scroll viewer has not enough space for it. Very often the viewport is a layout panel that implements IRadScrollViewport.
Declaration
[Browsable(false)]
public RadElement Viewport { get; set; }
Property Value
Object of type RadElement which represents the content that could be scrolled if necessary. Default value is null.
Methods
ArrangeOverride(SizeF)
Arranges the RadElement to its final location. The element must call the Arrange method of each of its children.
Declaration
protected override SizeF ArrangeOverride(SizeF finalSize)
Parameters
finalSize
The size that is available for element.
Returns
The rectangle occupied by the element. Usually finalSize. Should you return different size, the Layout system will restart measuring and rearranging the items. That could lead to infinite recursion.
Overrides
Remarks
In this method call to the Arrange method of each child must be made.
ArrangeViewPort(RectangleF, SizeF, ScrollFlags)
Declaration
protected virtual void ArrangeViewPort(RectangleF viewportRect, SizeF finalSize, RadScrollLayoutPanel.ScrollFlags flags)
Parameters
viewportRect
finalSize
flags
CreateChildElements()
Called by the element when constructed. Allows inheritors to build the element tree.
Declaration
protected override void CreateChildElements()
Overrides
GetScrollBarsSize(ScrollFlags)
Declaration
protected Size GetScrollBarsSize(RadScrollLayoutPanel.ScrollFlags flags)
Parameters
flags
Returns
GetScrollingNeeds(Size, Size)
Declaration
protected RadScrollLayoutPanel.ScrollFlags GetScrollingNeeds(Size extentSize, Size clientSize)
Parameters
extentSize
clientSize
Returns
InitializeFields()
Initializes member fields to their default values. This method is called prior the CreateChildItems one and allows for initialization of members on which child elements depend.
Declaration
protected override void InitializeFields()
Overrides
MeasureOverride(SizeF)
Measures the space required by the RadElement
Used by the layout system.
Declaration
protected override SizeF MeasureOverride(SizeF availableSize)
Parameters
availableSize
The size that is available to the RadElement. The available size can be infinity (to take the full size of the element)
Returns
The minimum size required by the element to be completely visible. Cannot be infinity.
Overrides
Remarks
In this method call to the Measure method of each child must be made.
OnNewViewportSet(RadElement, RadElement)
Declaration
protected virtual void OnNewViewportSet(RadElement oldViewport, RadElement newViewport)
Parameters
oldViewport
newViewport
OnPropertyChanged(RadPropertyChangedEventArgs)
Raises the RadPropertyChanged event and the standard .NET PropertyChanged event to notify subscribers of property value changes.
Declaration
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
Parameters
e
The RadPropertyChangedEventArgs containing information about the property change.
Overrides
OnScrollNeedsChanged(ScrollNeedsEventArgs)
Declaration
protected virtual void OnScrollNeedsChanged(ScrollNeedsEventArgs args)
Parameters
args
OnScrollParametersChanged(RadScrollBarElement)
Declaration
protected virtual void OnScrollParametersChanged(RadScrollBarElement scrollBar)
Parameters
scrollBar
ResetLayout()
Declaration
public void ResetLayout()
ScrollElementIntoView(RadElement)
Declaration
public void ScrollElementIntoView(RadElement childElement)
Parameters
childElement
Events
Scroll
Occurs when horizontal or vertical scrolling is performed
Declaration
public event RadScrollPanelHandler Scroll
Event Value
ScrollNeedsChanged
Occurs when the need for horizontal or vertical scrollbar has changed.
Declaration
public event ScrollNeedsHandler ScrollNeedsChanged
Event Value
ScrollParametersChanged
Occurs when property that affects the scrolling functionality is changed.
Declaration
public event RadPanelScrollParametersHandler ScrollParametersChanged
Event Value
ScrollViewportSet
Occurs when the Viewport is changed
Declaration
[Browsable(false)]
public event ScrollViewportSetHandler ScrollViewportSet
Event Value