RadScrollLayoutPanel
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
public RadScrollLayoutPanel()
public RadScrollLayoutPanel(RadElement viewport, int initialScrollThickness)
Fields
public static readonly RadProperty ForceViewportHeightProperty
public static readonly RadProperty ForceViewportWidthProperty
public static readonly RadProperty ScrollThicknessProperty
Properties
Gets the rectangle that is between the two scrollbars when they both are shown.
public FillPrimitive BlankSpot { get; }
Gets a value indicating whether can be performed horizontal scrolling operation
[Browsable(false)]
public bool CanHorizontalScroll { get; }
Gets a value indicating whether can be performed vertical scrolling operation
[Browsable(false)]
public bool CanVerticalScroll { get; }
[Browsable(false)]
public bool ForceViewportHeight { get; set; }
[Browsable(false)]
public bool ForceViewportWidth { get; set; }
Gets the horizontal scrollbar
public RadScrollBarElement HorizontalScrollBar { get; }
Gets or sets the scroll state of the horizontal scroll bar.
public ScrollState HorizontalScrollState { get; set; }
State of type ScrollState. Default value is AutoHide.
Gets the maximum possible scrolling position.
[Browsable(true)]
public Point MaxValue { get; set; }
Point which contains maximum values for scrolling in horizontal and vertical direction.
public bool MeasureWithAvaibleSize { get; set; }
Gets the minimum possible scrolling position.
[Browsable(true)]
public Point MinValue { get; set; }
Point which contains minimum values for scrolling in horizontal and vertical direction.
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.
[Browsable(true)]
public Point PixelsPerLineScroll { get; set; }
Gets or sets the thickness of the scrollbar.
[Browsable(true)]
public int ScrollThickness { get; set; }
Gets or sets a value indicating whether physical or logical scrolling will be used.
[Browsable(true)]
public bool UsePhysicalScrolling { get; set; }
Boolean value: when it is false logical scrolling will be used.
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.
Gets the vertical scrollbar
public RadScrollBarElement VerticalScrollBar { get; }
Gets or sets the scroll state of the vertical scroll bar.
public ScrollState VerticalScrollState { get; set; }
State of type ScrollState. Default value is AutoHide.
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.
[Browsable(false)]
public RadElement Viewport { get; set; }
Object of type RadElement which represents the content that could be scrolled if necessary. Default value is null.
Methods
Arranges the RadElement to its final location. The element must call the Arrange method of each of its children.
protected override SizeF ArrangeOverride(SizeF 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:
In this method call to the Arrange method of each child must be made.
protected virtual void ArrangeViewPort(RectangleF viewportRect, SizeF finalSize, RadScrollLayoutPanel.ScrollFlags flags)
Called by the element when constructed. Allows inheritors to build the element tree.
protected override void CreateChildElements()
Overrides:
protected Size GetScrollBarsSize(RadScrollLayoutPanel.ScrollFlags flags)
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.
protected override void InitializeFields()
Overrides:
Measures the space required by the RadElement
Used by the layout system.
protected override SizeF MeasureOverride(SizeF 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:
In this method call to the Measure method of each child must be made.
protected virtual void OnNewViewportSet(RadElement oldViewport, RadElement newViewport)
Raises the RadPropertyChanged event and the standard .NET PropertyChanged event to notify subscribers of property value changes.
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
The RadPropertyChangedEventArgs containing information about the property change.
Overrides:
protected virtual void OnScrollNeedsChanged(ScrollNeedsEventArgs args)
protected virtual void OnScrollParametersChanged(RadScrollBarElement scrollBar)
public void ResetLayout()
Events
Occurs when horizontal or vertical scrolling is performed
public event RadScrollPanelHandler Scroll
Occurs when the need for horizontal or vertical scrollbar has changed.
public event ScrollNeedsHandler ScrollNeedsChanged
Occurs when property that affects the scrolling functionality is changed.
public event RadPanelScrollParametersHandler ScrollParametersChanged
Occurs when the Viewport is changed
[Browsable(false)]
public event ScrollViewportSetHandler ScrollViewportSet