New to Telerik UI for WinForms? Start a free 30-day trial

The RadScrollablePanel control can be used as a container for different UI elements. This control is powered by the Telerik Presentation Framework and supports gradient backgrounds, shapes and theming. This control supports also theming of the scrollbars.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.UI.dll

Syntax:

C#
[TelerikToolboxCategory("Containers")]
[Docking(DockingBehavior.Ask)]
public class RadScrollablePanel : RadControl, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IAnalyticsProvider

Inheritance: objectMarshalByRefObjectComponentControlScrollableControlRadControlRadScrollablePanel...

Derived Classes: CollapsiblePanelControlsContainerRadDataEntryRadPopupContainerValidationPanel

Implements: IAnalyticsProviderIBindableComponentIComponentIComponentTreeHandlerIDisposableIDropTargetILayoutHandlerINotifyPropertyChangedISupportInitializeISupportInitializeNotificationISynchronizeInvokeIWin32Window...

Inherited Members RadControl.isResizing2RadControl.isDisposing2RadControl.invalidResizeRectRadControl.isAccessibilityRequestedRadControl.Construct()RadControl.CreateBehavior()RadControl.InitializeRootElement(RootRadElement)RadControl.LoadElementTree()RadControl.LoadElementTree(Size)RadControl.SetForeColorThemeOverrides()RadControl.ResetForeColorThemeOverrides()RadControl.OnKeyDown(KeyEventArgs)RadControl.OnKeyUp(KeyEventArgs)RadControl.OnPreviewKeyDown(PreviewKeyDownEventArgs)RadControl.OnKeyPress(KeyPressEventArgs)RadControl.OnClick(EventArgs)RadControl.OnDoubleClick(EventArgs)RadControl.OnMouseDown(MouseEventArgs)RadControl.OnMouseUp(MouseEventArgs)RadControl.OnMouseEnter(EventArgs)RadControl.OnMouseLeave(EventArgs)RadControl.OnMouseMove(MouseEventArgs)RadControl.OnMouseHover(EventArgs)RadControl.OnMouseWheel(MouseEventArgs)RadControl.OnMouseCaptureChanged(EventArgs)RadControl.OnGotFocus(EventArgs)RadControl.OnLostFocus(EventArgs)RadControl.OnCreateControl()RadControl.OnHandleDestroyed(EventArgs)RadControl.OnParentChanged(EventArgs)RadControl.OnVisibleChanged(EventArgs)RadControl.OnFontChanged(EventArgs)RadControl.OnForeColorChanged(EventArgs)RadControl.OnBackColorChanged(EventArgs)RadControl.OnEnabledChanged(EventArgs)RadControl.OnBindingContextChanged(EventArgs)RadControl.OnLocationChanged(EventArgs)RadControl.OnPaddingChanged(EventArgs)RadControl.OnPaint(PaintEventArgs)RadControl.OnLayout(LayoutEventArgs)RadControl.OnAutoSizeChanged(EventArgs)RadControl.WndProc(ref Message)RadControl.OnInvalidated(RadElement)RadControl.OnLoad(Size)RadControl.OnCaptureLosing()RadControl.OnToolTipTextNeeded(object, ToolTipTextNeededEventArgs)RadControl.OnScreenTipNeeded(object, ScreenTipNeededEventArgs)RadControl.OnThemeNameChanged(ThemeNameChangedEventArgs)RadControl.ProcessMnemonic(char)RadControl.ProcessFocusRequested(RadElement)RadControl.ProcessCaptureChangeRequested(RadElement, bool)RadControl.IsInputKey(Keys)RadControl.GetInputElement()RadControl.BeginInit()RadControl.EndInit()RadControl.OnNotifyPropertyChanged(PropertyChangedEventArgs)RadControl.GetPreferredSize(Size)RadControl.SetBoundsCore(int, int, int, int, BoundsSpecified)RadControl.GetRootElementDesiredSize(int, int, int, int)RadControl.OnZoomGesture(ZoomGestureEventArgs)RadControl.OnRotateGesture(RotateGestureEventArgs)RadControl.OnPanGesture(PanGestureEventArgs)RadControl.OnTwoFingerTapGesture(GestureEventArgs)RadControl.OnPressAndTapGesture(PressAndTapGestureEventArgs)RadControl.OnGesture(GestureEventArgs)RadControl.ProcessGesture(Message)RadControl.EnableGesture(GestureType)RadControl.DisableGesture(GestureType)RadControl.Refresh()RadControl.SuspendUpdate()RadControl.ResumeUpdate()RadControl.ResumeUpdate(bool)RadControl.InvokeLayoutCallback(LayoutCallback)RadControl.RegisterHostedControl(RadHostItem)RadControl.UnregisterHostedControl(RadHostItem, bool)RadControl.ResolveStyleGroupForElement(StyleGroup, RadObject)RadControl.GetPlainText()RadControl.ShouldSerializeProperty(RadProperty)RadControl.ShouldSerializeProperty(RadProperty, RadObject)RadControl.ResetProperty(RadProperty, RadObject)RadControl.CanEditElementAtDesignTime(RadElement)RadControl.ProcessCodedUIMessage(ref IPCMessage)RadControl.FindPropertyInChildren(RadControl, IPCMessage)RadControl.ScaleControl(SizeF, BoundsSpecified)RadControl.PerformRadAutoScale(BoundsSpecified?)RadControl.GetMonitorDpiScaleFactor(Control)RadControl.SetRadAutoScale(bool)RadControl.EnableDpiScalingRadControl.EnableRadAutoScaleRadControl.EnableRadFormInitialDpiScalingRadControl.EnableImageDpiScalingRadControl.EnableSvgImagesRadControl.IsLoadedRadControl.ElementTreeRadControl.UseCompatibleTextRenderingDefaultValueRadControl.BehaviorRadControl.RootElementRadControl.ThemeNameRadControl.TextRadControl.EnableThemingRadControl.ThemeClassNameRadControl.ImageListRadControl.ImageScalingSizeRadControl.UseCompatibleTextRenderingRadControl.AutoSizeRadControl.MaximumSizeRadControl.MinimumSizeRadControl.FocusableRadControl.SiteRadControl.CausesValidationRadControl.IsInitializingRadControl.SmallImageListRadControl.SmallImageScalingSizeRadControl.IsDesignModeRadControl.IsDisplayedRadControl.FocusedElementRadControl.AllowShowFocusCuesRadControl.ShowItemToolTipsRadControl.CommandBindingsRadControl.EnableKeyMapRadControl.BackColorRadControl.ForeColorRadControl.FontRadControl.ValidationCancelRadControl.EnableAnalyticsRadControl.AnalyticsNameRadControl.EnableRadAccessibilityObjectsRadControl.EnableCodedUITestsRadControl.EnableCodedUITestsDefaultValueRadControl.EnableUIAutomationRadControl.EnableUIAutomationDefaultValueRadControl.ElementInvalidatedRadControl.ToolTipTextNeededRadControl.ScreenTipNeededRadControl.ThemeNameChangedRadControl.InitializedRadControl.PropertyChangedRadControl.ZoomGestureRadControl.RotateGestureRadControl.PanGestureRadControl.TwoFingerTapGestureRadControl.PressAndTapGesture...

Constructors

Initializes a new instance of the RadScrollablePanel class.

C#
public RadScrollablePanel()

Properties

Gets or sets a value indicating whether the focused control inside the RadScrollablePanel will be automatically scrolled into view when gaining focus.

C#
public bool AllowAutomaticScrollToControl { get; set; }

Gets or sets a value indicating whether the container enables auto-scrolling. When enabled, scroll bars appear automatically when content exceeds the visible area.

C#
public override bool AutoScroll { get; set; }
Property Value:

true if auto-scrolling is enabled; otherwise, false.

Overrides: ScrollableControl.AutoScroll

Gets or sets the margin around the scrollable content. This property defines the extra space around the scrollable area.

C#
public Size AutoScrollMargin { get; set; }
Property Value:

A Size structure representing the margin dimensions.

Gets or sets the minimum size of the auto-scroll region. This property defines the minimum scrollable area dimensions.

C#
public Size AutoScrollMinSize { get; set; }
Property Value:

A Size structure representing the minimum scrollable size.

Gets or sets the auto-scroll offset for the scrollable panel. This property determines the current scroll position offset.

C#
public override Point AutoScrollOffset { get; set; }
Property Value:

A Point representing the scroll offset coordinates.

Overrides: Control.AutoScrollOffset

Gets or sets the location of the auto-scroll position. This property determines where the scrolled content is positioned relative to the container.

C#
public Point AutoScrollPosition { get; set; }
Property Value:

A Point representing the auto-scroll position coordinates.

Gets the default size of the control.

C#
protected override Size DefaultSize { get; }
Property Value:

The default System.Drawing.Size of the control.

Overrides: Control.DefaultSize

The default Size of the control.

Gets the horizontal scrollbar of the control.

C#
[Browsable(false)]
public RadHScrollBar HorizontalScrollbar { get; }

Gets or sets the state of the horizontal scroll bar which indicates whether it will be always visible(), always hidden() or determined by the content() - default

C#
public ScrollState HorizontalScrollBarState { get; set; }

Gets or sets the padding within the scrollable panel. This property defines the spacing between the edge of the panel and its content.

C#
public Padding Padding { get; set; }
Property Value:

A Padding structure representing the padding values.

Gets the container panel that holds all the components added to the panel.

C#
public virtual Panel PanelContainer { get; }

Gets an instance of the RadScrollablePanelElement class which represents the main element of the control.

C#
[Browsable(false)]
public RadScrollablePanelElement PanelElement { get; }

Gets the vertical scrollbar of the control.

C#
[Browsable(false)]
public RadVScrollBar VerticalScrollbar { get; }

Gets or sets the state of the vertical scroll bar which indicates whether it will be always visible(), always hidden() or determined by the content() - default

C#
public ScrollState VerticalScrollBarState { get; set; }

Methods

Adjusts the horizontal scrollbar's margin to make room for the sizing grip when the vertical scrollbar is visible.

C#
protected virtual void AdjustSizingGrip()

Creates the child elements of the RadScrollablePanel control.

C#
protected override void CreateChildItems(RadElement parent)
Parameters:parentRadElement

The parent RadElement to which child elements will be added.

Overrides: RadControl.CreateChildItems(RadElement)

Creates a new instance of the control's Control.ControlCollection.

C#
protected override Control.ControlCollection CreateControlsInstance()
Returns:

Control.ControlCollection

A new RadScrollablePanelControlCollection for this control.

Overrides: Control.CreateControlsInstance()

Creates the panel element for this RadScrollablePanel.

C#
protected virtual RadScrollablePanelElement CreatePanelElement()
Returns:

RadScrollablePanelElement

A new instance of RadScrollablePanelElement.

Creates the root element of the element tree for this control.

C#
protected override RootRadElement CreateRootElement()
Returns:

RootRadElement

Overrides: RadControl.CreateRootElement()

Creates the internal container control that hosts child controls and manages scrolling.

C#
protected virtual RadScrollablePanelContainer CreateScrollablePanelContainer()
Returns:

RadScrollablePanelContainer

Releases the resources used by the control, unsubscribing from container and border events when disposing.

C#
protected override void Dispose(bool disposing)
Parameters:disposingbool

Overrides: RadControl.Dispose(bool)

Resizes the panel to fit its contents.

C#
public virtual void FitToChildControls()

Calculates the non-client margin of the control based on the radius of the round rect shape.

C#
protected virtual Padding GetContentMargin()
Returns:

Padding

An instance of the Padding struct which represents the left, top, right and bottom margin.

Gets the color used to paint the sizing grip, derived from the horizontal scrollbar's fill.

C#
protected virtual Color GetSizingGripColor()
Returns:

Color

This method initializes the scrollbars and the container control.

C#
protected virtual void InitializeInternalControls()

This method inserts the scrollbars and the container in the Controls collection of this control.

C#
protected virtual void InsertInternalControls()

Handles changes to the auto-scroll property by updating the panel's padding, scrollbars, and layout.

C#
protected virtual void OnAutoScrollChanged()

Handles the creation of the control's handle and initializes auto-scroll settings.

C#
protected override void OnHandleCreated(EventArgs e)
Parameters:eEventArgs

An EventArgs that contains the event data.

Overrides: Control.OnHandleCreated(EventArgs)

Synchronizes the scrollbar visibility when the AutoScroll property changes.

C#
protected override void OnNotifyPropertyChanged(string propertyName)
Parameters:propertyNamestring

Overrides: RadControl.OnNotifyPropertyChanged(string)

Handles the control's resize event and updates the scrollbars position.

C#
protected override void OnResize(EventArgs e)
Parameters:eEventArgs

An EventArgs that contains the event data.

Overrides: Control.OnResize(EventArgs)

Handles changes to the control's right-to-left layout and adjusts the vertical scrollbar position accordingly.

C#
protected override void OnRightToLeftChanged(EventArgs e)
Parameters:eEventArgs

An EventArgs that contains the event data.

Overrides: RadControl.OnRightToLeftChanged(EventArgs)

Handles changes to the control's theme and updates the scrollbars accordingly.

C#
protected override void OnThemeChanged()

Overrides: RadControl.OnThemeChanged()

Forwards the auto-size changed notification to the internal container control.

C#
protected override void ProcessAutoSizeChanged(bool value)
Parameters:valuebool

Overrides: RadControl.ProcessAutoSizeChanged(bool)

Resets the back color theme value overrides on the panel element and reapplies the current theme.

C#
protected override void ResetBackColorThemeOverrides()

Overrides: RadControl.ResetBackColorThemeOverrides()

Applies the control's BackColor as a theme value override to the panel element and its fill.

C#
protected override void SetBackColorThemeOverrides()

Overrides: RadControl.SetBackColorThemeOverrides()

Synchronizes the horizontal scrollbar's position with the specified scroll value.

C#
protected virtual void SynchronizeHScrollbar(int value)
Parameters:valueint

Updates scrollbar visibility, position, and the sizing grip to match the specified scroll point.

C#
protected virtual void SynchronizeScrollbars(Point scrollPoint)
Parameters:scrollPointPoint

Updates the visibility of the vertical and horizontal scrollbars based on their configured ScrollState.

C#
protected virtual void SynchronizeScrollbarsVisiblity()

Synchronizes the vertical scrollbar's position with the specified scroll value.

C#
protected virtual void SynchronizeVScrollbar(int value)
Parameters:valueint