RadSplitContainer
Represents a container control that provides a resizable split interface with multiple panels. The control supports both horizontal and vertical orientations and allows dynamic resizing of contained panels.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
[TelerikToolboxCategory("Containers")]
[Docking(DockingBehavior.Ask)]
[RadToolboxItem(false)]
public class RadSplitContainer : SplitPanel, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IAnalyticsProvider
Inheritance: objectMarshalByRefObjectComponentControlScrollableControlRadControlSplitPanelRadSplitContainer...
Derived Classes:
Implements:
Inherited Members
Constructors
Initializes a new instance of the RadSplitContainer class.
public RadSplitContainer()
Initializes a new instance of the RadSplitContainer class with the specified orientation.
public RadSplitContainer(Orientation orientation)
The orientation of the split container.
Properties
Gets the rectangle, in client coordinates, that bounds the content area of the split container.
[Browsable(false)]
public virtual Rectangle ContentRectangle { get; }
Gets or sets the cursor that is displayed when the mouse pointer is over the control.
[Browsable(false)]
public override Cursor Cursor { get; set; }
Overrides:
Determines whether the panels can be collapsed when clicking twice on splitter or click once on navigation button. If you disable collapsing, UseSplitterButtons will also be disabled.
public bool EnableCollapsing { get; set; }
Gets a value indicating whether the bounds of the split panels should be updated immediately on drag.
[Browsable(true)]
public bool EnableImmediateResize { get; set; }
Gets a value indicating whether at least one of this container's split panels is not collapsed.
[Browsable(false)]
public bool HasNonCollapsedChild { get; }
Gets a value indicating whether at least one of this container's split panels is visible (not collapsed).
[Browsable(false)]
public bool HasVisibleSplitPanels { get; }
Gets or sets the cursor which is used while resizing a panel and the control`s orientation is horizontal.
[Browsable(true)]
public virtual Cursor HorizontalResizeCursor { get; set; }
Gets or sets the layout strategy that arranges all the visible SplitPanel children.
[Browsable(false)]
public SplitContainerLayoutStrategy LayoutStrategy { get; set; }
Gets or sets the cursor which is used while the mouse is over the navigation buttons.
[Browsable(true)]
public virtual Cursor NavigationButtonCursor { get; set; }
Gets or sets a value indicating the horizontal or vertical orientation of the Telerik.WinControls.UI.RadSplitContainer panels.
public Orientation Orientation { get; set; }
Gets the top-most RadSplitContainer in the nesting hierarchy, walking up through parent split containers.
[Browsable(false)]
public RadSplitContainer RootContainer { get; }
Gets the split container element.
[Browsable(false)]
public SplitContainerElement SplitContainerElement { get; }
Gets the collection of SplitPanel objects hosted directly within this split container.
[Browsable(false)]
public SplitPanelCollection SplitPanels { get; }
Gets the collection of splitters used to resize the split panels within this container.
[Browsable(false)]
public SplitterCollection Splitters { get; }
Gets or sets the width of a single splitter on the container. Specify zero to prevent displaying any splitters at all.
public virtual int SplitterWidth { get; set; }
Gets the name of the theme class applied to this control, unless a custom theme class name has been set.
[Browsable(false)]
public override string ThemeClassName { get; set; }
Overrides:
Enable and Disable navigation buttons. If you enable the buttons EnableCollapsing will also be enabled.
public bool UseSplitterButtons { get; set; }
Gets or sets the cursor which is used while resizing a panel and the control`s orientation is vertical.
[Browsable(true)]
public virtual Cursor VerticalResizeCursor { get; set; }
Methods
Applies theme to all SplitterElements.
protected virtual void ApplyThemeToSplitterElements()
Calculates the splitter distance based on the specified direction and bounds.
protected virtual void CalculateSplitterDistance(RadDirection direction, int initialSplitterDistance, int lastSplitterPosition, int boundsMinimum, int boundsMaximum)
The direction to move the splitter.
initialSplitterDistanceintThe initial splitter distance.
lastSplitterPositionintThe last splitter position.
boundsMinimumintThe minimum bounds value.
boundsMaximumintThe maximum bounds value.
Performs post-construction initialization, defaulting the container to a vertical orientation.
protected override void Construct()
Overrides:
Creates the child elements of the control, adding the main SplitContainerElement.
protected override void CreateChildItems(RadElement parent)
The parent RadElement to which the child elements will be added.
Overrides:
Creates the collection used to store the control's child controls.
protected override Control.ControlCollection CreateControlsInstance()
A new RadSplitContainer.ControlCollection instance.
Overrides:
Gets the SplitterElement and RadButtonElement whose rectangles contain the specified point.
public virtual void GetSplitterElementAndButtonElementAtPoint(Point clientPoint, out SplitterElement splitter, out RadButtonElement button)
The point to test, in SplitContainer client coordinates.
splitterSplitterElementWhen this method returns, contains the SplitterElement at the specified point, or null if no splitter is found.
buttonRadButtonElementWhen this method returns, contains the RadButtonElement at the specified point, or null if no button is found.
Gets the SplitterElement which rectangle contains the specified point.
public virtual SplitterElement GetSplitterElementAtPoint(Point clientPoint)
Point to test, in SplitContainer client coordinates.
Returns:SplitterElement if found, null otherwise.
Performs the internal layout logic for the split container.
protected void LayoutInternal()
Moves the specified splitter in the given direction.
public void MoveSplitter(SplitterElement splitter, RadDirection direction)
The splitter element to move.
directionRadDirectionThe direction to move the splitter.
Called when a child panel's collapsed state changes.
protected virtual void OnChildPanelCollapsedChanged(SplitPanel child)
The child panel whose collapsed state changed.
Called when a control is removed from the split container.
protected override void OnControlRemoved(ControlEventArgs e)
The event arguments containing information about the removed control.
Overrides:
Called when the layout needs to be performed.
protected override void OnLayout(LayoutEventArgs e)
The layout event arguments.
Overrides:
Called when the control is loaded with the specified desired size.
protected override void OnLoad(Size desiredSize)
The desired size of the control.
Overrides:
Called when the control is double-clicked.
protected override void OnMouseDoubleClick(MouseEventArgs e)
The mouse event arguments.
Overrides:
Called when a mouse button is pressed over the control.
protected override void OnMouseDown(MouseEventArgs e)
The mouse event arguments.
Overrides:
Called when the mouse pointer leaves the control.
protected override void OnMouseLeave(EventArgs e)
The event arguments.
Overrides:
Called when the mouse pointer moves over the control.
protected override void OnMouseMove(MouseEventArgs e)
The mouse event arguments.
Overrides:
Called when a mouse button is released over the control.
protected override void OnMouseUp(MouseEventArgs e)
The mouse event arguments.
Overrides:
Called when the orientation of the split container changes.
protected virtual void OnOrientationChanged(EventArgs e)
The event arguments.
Raises the PanelCollapsed event.
public virtual void OnPanelCollapsed(SplitterElement splitter, EventArgs e)
The splitter element involved in the operation.
eEventArgsThe event arguments.
Raises the PanelCollapsing event.
public virtual void OnPanelCollapsing(SplitterElement splitter, RadSplitContainer.PanelCollapsingEventArgs e)
The splitter element involved in the operation.
eRadSplitContainer.PanelCollapsingEventArgsThe event arguments containing panel collapsing information.
Called when the parent of the control changes.
protected override void OnParentChanged(EventArgs e)
The event arguments.
Overrides:
Raises the SplitterMoved event.
protected virtual void OnSplitterMoved(SplitterEventArgs e)
The event arguments containing splitter movement information.
Raises the SplitterMoving event.
protected virtual void OnSplitterMoving(SplitterCancelEventArgs e)
The event arguments containing splitter movement information.
Called when the theme of the control changes.
protected override void OnThemeChanged()
Overrides:
Resets theme overrides for the background color property.
protected override void ResetBackColorThemeOverrides()
Overrides:
Restores the splitter to its last known position.
public void RestoreSplitterPosition(SplitterElement splitter)
The splitter element to restore.
Sets theme overrides for the background color property.
protected override void SetBackColorThemeOverrides()
Overrides:
Updates the splitter, associated with the specified index of a child SplitPanel.
protected virtual void UpdateSplitter(SplitContainerLayoutInfo info, int panelIndex, Rectangle bounds)
The layout info, containing information about the operation.
panelIndexintThe index of the panel for which the splitter should be updated.
boundsRectangleThe bounding rectangle of the splitter.
Events
Occurs when a panel has collapsed.
public event RadSplitContainer.PanelCollapsedEventHandler PanelCollapsed
Occurs when the collapsed state of any panel changes.
public event SplitPanelEventHandler PanelCollapsedChanged
Occurs when a panel is collapsing.
public event RadSplitContainer.PanelCollapsingEventHandler PanelCollapsing
Occurs when any of the splitters is moved.
[Browsable(true)]
public event SplitterEventHandler SplitterMoved
Occurs when any of the splitters is moving.
[Browsable(true)]
public event SplitterCancelEventHandler SplitterMoving