RadEditorControl
Provides an abstract base class for RadControls that support inline editing and advanced layout behaviors, particularly for controls hosted within TableLayoutPanel containers.
Definition
Namespace:Telerik.WinControls
Assembly:Telerik.WinControls.dll
Syntax:
public abstract class RadEditorControl : RadControl, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IAnalyticsProvider
Inheritance: objectMarshalByRefObjectComponentControlScrollableControlRadControlRadEditorControl...
Derived Classes:
Implements:
Inherited Members
Constructors
protected RadEditorControl()
Methods
Retrieves the size of a rectangular area into which a control can be fitted, with special handling for TableLayoutPanel scenarios.
public override Size GetPreferredSize(Size proposedSize)
The custom-sized area for a control.
Returns:An ordered pair of type Size representing the width and height of a rectangle.
Overrides:
When the control is hosted within a TableLayoutPanel, this method provides enhanced handling for edge cases where the proposed size has extremely small dimensions (1 pixel or less). In such cases, it requests the preferred size with maximum dimensions to ensure proper sizing calculations.
This specialized behavior prevents sizing issues that can occur in TableLayoutPanel scenarios, particularly when controls are being measured during complex layout operations or when forms are minimized.
Calculates the desired size of the root element with enhanced TableLayoutPanel support.
protected override Size GetRootElementDesiredSize(int x, int y, int width, int height)
The x-coordinate for the sizing calculation.
yintThe y-coordinate for the sizing calculation.
widthintThe width constraint for the sizing calculation.
heightintThe height constraint for the sizing calculation.
Returns:A Size structure containing the desired dimensions of the root element.
Overrides:
This method provides specialized sizing behavior when the control is hosted within a TableLayoutPanel. When extremely small dimensions (1 pixel or less) are provided as constraints, the method automatically adjusts the measurement parameters to use maximum values, ensuring accurate size calculations.
The method also includes fallback logic to use the control's current dimensions when the calculated size is invalid or when maximum values are returned, preventing sizing anomalies in complex layout scenarios.
Raises the ParentChanged event and detects whether the control is hosted within a TableLayoutPanel.
protected override void OnParentChanged(EventArgs e)
An EventArgs that contains the event data.
Overrides:
This method automatically detects when the control is placed within a TableLayoutPanel container and adjusts internal behavior to handle specialized sizing and layout requirements.
Sets the specified bounds of the control with special handling for TableLayoutPanel and minimized form scenarios.
protected override void SetBoundsCore(int x, int y, int width, int height, BoundsSpecified specified)
The new x-coordinate of the control.
yintThe new y-coordinate of the control.
widthintThe new width of the control.
heightintThe new height of the control.
specifiedBoundsSpecifiedA bitwise combination of BoundsSpecified values.
Overrides:
This method provides enhanced handling for controls hosted within TableLayoutPanel containers, particularly when the parent form is minimized. It prevents unwanted width changes when the root element is configured to stretch horizontally, maintaining visual consistency during form state transitions.
The method checks for minimized form states and preserves the current width when horizontal stretching is enabled, preventing layout anomalies that can occur during form minimization and restoration cycles.