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

Serves as the foundational base class for all Telerik WinControls, bridging the Windows Forms framework with the Telerik Presentation Framework (TPF) element-based architecture.

RadControl acts as the host and coordinator for the entire RadElement tree that defines a control's structure and behavior. It inherits from ScrollableControl for full Windows Forms compatibility while managing the sophisticated TPF element hierarchy through its RootElement.

As an IComponentTreeHandler, RadControl manages hosted controls, coordinates focus and DPI scaling, and translates Windows Forms messages into TPF element events. It implements INotifyPropertyChanged to ensure property changes are communicated to data binding systems.

All RadControls participate in the unified theming system, automatically applying themes to their element trees and responding to runtime theme changes. The control includes comprehensive design-time support for Visual Studio integration and serves as the foundation for RadButton, RadTextBox, RadGridView, and all other Telerik controls.

Definition

Namespace:Telerik.WinControls

Assembly:Telerik.WinControls.dll

Syntax:

C#
public class RadControl : ScrollableControl, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IAnalyticsProvider

Inheritance: objectMarshalByRefObjectComponentControlScrollableControlRadControl...

Derived Classes: RadEditorControlRadItemsControlRadNonClientUIControlRadScreenTipColumnChooserControlDockingGuidesControlQuickNavigatorEditorBaseControlRadLinearGaugeRadRadialGaugeLayoutControlDraggableOverlayRadAIPromptRadAIPromptButtonRadBindingNavigatorRadButtonBaseRadCalculatorRadCalendarRadCalendarFastNavigationControlRadCarouselRadChartViewRadChatRadClockRadCollapsiblePanelTransparentColorBoxRadCommandBarRadCommandBarOverflowPanelHostContolRadDiagramRadDropDownButtonRadFilterViewRadGanttViewRadGridViewRadGroupBoxRadHeatMapRadImageEditorRadLabelRadListControlRadListViewRadMapRadPanelRadPanoramaRadPdfViewerRadPictureBoxRadPipsPagerRadPivotGridRadPopupControlBaseRadProgressBarRadPropertyGridRadRangeSelectorRadRatingRadRibbonBarBackstageViewRadRichTextEditorRadRichTextEditorRulerRadRotatorRadSchedulerRadSchedulerNavigatorRadScrollBarRadScrollablePanelRadSeparatorRadSlideViewRadSmartPasteButtonRadSparklineRadSpeechToTextButtonRadSplitterRadSpreadsheetRadStatusStripRadStepProgressBarRadSyntaxEditorRadTaskBoardRadTaskDialogControlRadTextBoxControlRadTimePickerContentRadTitleBarRadToggleSwitchRadTreeMapRadTreeViewRadVirtualGridRadVirtualKeyboardRadWaitingBarRadWebCamRadWizardRadSplashScreenControlSplitPanelTimePickerDoneButtonContentWatermarkPreviewControlZoomPopup...

Implements: IAnalyticsProviderIBindableComponentIComponentIComponentTreeHandlerIDisposableIDropTargetILayoutHandlerINotifyPropertyChangedISupportInitializeISupportInitializeNotificationISynchronizeInvokeIWin32Window...

Constructors

Initializes a control and creates its input behavior and element tree.

C#
public RadControl()

The constructor invokes the virtual Construct() method before a derived constructor runs. Overrides of Construct() should not depend on derived fields that are initialized later.

Fields

Stores the union of element invalidation bounds accumulated during a resize/layout calculation.

C#
protected Rectangle invalidResizeRect
C#
protected bool isAccessibilityRequested

Indicates that base control disposal has completed and RadControl cleanup is underway.

C#
protected bool isDisposing2

Marks a resize pass so invalidations are accumulated and the subsequent OnLayout(LayoutEventArgs) pass skips its additional root update.

C#
protected bool isResizing2

Properties

Indicates focus cues display, when available, based on the corresponding control type and the current UI state.

C#
[Browsable(true)]
public virtual bool AllowShowFocusCues { get; set; }

Gets or sets the Analytics Name associated with this control. By default the Control Name property is logged. If you want to customize the information which will be logged for this control set this property to a preferred value.

C#
[Browsable(false)]
public virtual string AnalyticsName { get; set; }

Implements: IAnalyticsProvider.AnalyticsName

Gets or sets a value indicating whether the control is automatically resized to display its entire contents.

C#
[Browsable(true)]
public override bool AutoSize { get; set; }

Overrides: Control.AutoSize

Gets or sets the BackColor of the control. This is actually the BackColor property of the root element.

C#
public override Color BackColor { get; set; }

Overrides: Control.BackColor

Gets the input behavior for the control.

C#
[Browsable(false)]
public ComponentInputBehavior Behavior { get; }

Gets or sets a value indicating whether the control causes validation to be performed on any controls that require validation when it receives focus.

C#
public bool CausesValidation { get; set; }

Gets the live input-binding collection used by this control's shortcut manager.

C#
[TypeConverter(typeof(ExpandableObjectConverter))]
public InputBindingsCollection CommandBindings { get; }

Add or remove bindings through this collection to configure keyboard commands for the control.

Gets the themable component tree that owns the control's root element and applies its theme.

C#
[Browsable(false)]
public virtual ComponentThemableElementTree ElementTree { get; }

Gets or sets a value indicating whether the Analytics functionality is enabled or disabled for this control.

C#
[Browsable(true)]
public virtual bool EnableAnalytics { get; set; }

Implements: IAnalyticsProvider.EnableAnalytics

Gets or sets a value indicating whether the CodedUI Tests functionality is enabled.

C#
[Browsable(true)]
public virtual bool EnableCodedUITests { get; set; }

Gets or sets the default value for EnableCodedUITests property.

C#
[Browsable(true)]
public static bool EnableCodedUITestsDefaultValue { get; set; }

Gets or sets a value indicating whether the RadControls scaling logic will be used when the application is run in a high DPI environment.

C#
public static bool EnableDpiScaling { get; set; }

Gets or sets a value indicating whether the RadControls scaling logic will be used to resize the images when the application is run in a high DPI environment.

C#
public static bool EnableImageDpiScaling { get; set; }

Gets or sets whether Key Map (Office 2007 like accelerator keys map) is used for this specific control. Currently this option is implemented for the RadRibbonBar control only.

C#
[Browsable(true)]
public virtual bool EnableKeyMap { get; set; }

Gets or sets a value indicating whether the RadControls Accessible custom object is enabled.

C#
[Browsable(false)]
public virtual bool EnableRadAccessibilityObjects { get; set; }

Gets or sets a value that indicates whether to use the new auto-scaling mechanism or not. Enabled by default.

C#
public static bool EnableRadAutoScale { get; set; }

Do not modify. For internal use only.

C#
public static bool EnableRadFormInitialDpiScaling { get; set; }

Gets or sets a value indicating whether the RadControls will draw use the SvgImages in ImagePrimitive and LightVisualElement objects, or if [false] will draw the corresponding Image property if applicable.

C#
public static bool EnableSvgImages { get; set; }

Gets or sets value indicating whether the control is styled through theme

C#
public bool EnableTheming { get; set; }

Gets or sets a value indicating whether the UI Automation functionality is enabled.

C#
[Browsable(true)]
public virtual bool EnableUIAutomation { get; set; }

Gets or sets the default value for EnableUIAutomation property.

C#
[Browsable(true)]
public static bool EnableUIAutomationDefaultValue { get; set; }

Gets or sets whether the control may receive focus on behalf of an element-level focus request.

C#
public virtual bool Focusable { get; set; }

Gets or sets the element tracked as focused by this control's element-tree behavior.

C#
[Browsable(false)]
public RadElement FocusedElement { get; set; }

Setting a non-null element requests focus for it; setting null clears the currently focused element.

Gets or sets the Font of the control. This is actually the Font property of the root element.

C#
public override Font Font { get; set; }

Overrides: Control.Font

Gets or sets the ForeColor of the control. This is actually the ForeColor property of the root element.

C#
public override Color ForeColor { get; set; }

Overrides: Control.ForeColor

Gets or sets the ImageList that contains the images displayed by this control.

C#
[Browsable(true)]
public virtual ImageList ImageList { get; set; }

Implements: IComponentTreeHandler.ImageList

Gets or sets the image scaling size.

C#
[Browsable(false)]
public Size ImageScalingSize { get; set; }

Implements: IComponentTreeHandler.ImageScalingSize

Gets whether WinForms reports this control as being in design mode.

C#
[Browsable(false)]
public bool IsDesignMode { get; }

Determines whether the control is currently displayed on the screen.

C#
[Browsable(false)]
public bool IsDisplayed { get; }

Gets whether initialization is in progress between BeginInit() and EndInit().

C#
[Browsable(false)]
public bool IsInitializing { get; }

Determines whether the control is properly loaded.

C#
[Browsable(false)]
public bool IsLoaded { get; }

Gets or sets the size that is the upper limit that GetPreferredSize can specify.

C#
public override Size MaximumSize { get; set; }

Overrides: Control.MaximumSize

Gets or sets the size that is the lower limit that GetPreferredSize can specify

C#
public override Size MinimumSize { get; set; }

Overrides: Control.MinimumSize

Gets or sets padding within the control.

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

A Padding representing the control's internal spacing characteristics.

Gets the RootElement of the control.

C#
[Browsable(true)]
[TypeConverter(typeof(ExpandableObjectConverter))]
public RootRadElement RootElement { get; }

Implements: IComponentTreeHandler.RootElement

Gets or sets a value indicating whether ToolTips are shown for the RadItem objects contained in the RadControl.

C#
public virtual bool ShowItemToolTips { get; set; }

Gets or sets the design-time site assigned to this control.

C#
public override ISite Site { get; set; }

Overrides: Control.Site

Setting the site also updates the root element's design-mode state from DesignMode.

Gets or sets the SmallImageList that contains the small images which are displayed when there's not enough space.

C#
[Browsable(true)]
public virtual ImageList SmallImageList { get; set; }

Implements: IComponentTreeHandler.SmallImageList

Gets or sets the small image scaling size.

C#
[Browsable(false)]
public Size SmallImageScalingSize { get; set; }

Implements: IComponentTreeHandler.SmallImageScalingSize

C#
[Browsable(true)]
[Bindable(true)]
[SettingsBindable(true)]
public override string Text { get; set; }

Overrides: Control.Text

Gets or sets the class name string that ThemeResolutionService will use to find the themes registered for the control.

C#
public virtual string ThemeClassName { get; set; }

By default the return value is RadControl's type FullName; Some controls like drop down menu has different ThemeClassName depending on the runtime usage of the control.

Gets or sets control's preferred theme name. Themes are stored and retrieved using APIs of ThemeResolutionService.

C#
[Browsable(true)]
public virtual string ThemeName { get; set; }

Implements: IComponentTreeHandler.ThemeName

If ThemeResolutionService.ApplicatonThemeName refers to a non-empty string, the theme of a RadControl can differ from the one set using RadControls.ThemeName property. If the themes differ, the RadControls.ThemeName property will be overridden by ThemeResolutionService.ApplicatonThemeName. If no theme is registered with a name as ThemeResolutionService.ApplicatonThemeName, then control will revert to the theme specified by its ThemeName property. If ThemeName is assigned to a non-existing theme name, the control may have no visual properties assigned, which will cause it look and behave in unexpected manner. If ThemeName equals empty string, control's theme is set to a theme that is registered within ThemeResolutionService with the name "ControlDefault".

Determines whether to use compatible text rendering engine (GDI+) or not (GDI).

C#
public virtual bool UseCompatibleTextRendering { get; set; }

Set or get the default value for UseCompatibleTextRendering property.

C#
public static bool UseCompatibleTextRenderingDefaultValue { get; set; }

Gets whether WinForms canceled validation for this control.

C#
protected bool ValidationCancel { get; }

When validation is canceled during a qualifying mouse-button press or double-click and CausesValidation is enabled, the window procedure dispatches the message through DefWndProc and returns. After base message processing, a canceled state also causes a capture-release request when this control still holds capture.

Methods

Suspends layout during initialization.

C#
public virtual void BeginInit()

Implements: ISupportInitialize.BeginInit()

Determines whether an element may be edited via the EditUIElements dialog at design-time.

C#
protected virtual bool CanEditElementAtDesignTime(RadElement element)
Parameters:elementRadElementReturns:

bool

Creates the control's layout manager, input behavior, and element tree.

C#
protected virtual void Construct()

Called during base-class construction. Overrides must call base.Construct() to initialize this infrastructure.

Creates the input behavior instance. Allows inheritors to provide custom input implementations.

C#
protected virtual ComponentInputBehavior CreateBehavior()
Returns:

ComponentInputBehavior

Creates the control's child elements under the specified parent.

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

The element that will contain the child elements.

The base implementation sets the root element's name to the control's name.

Creates the root element that hosts the control's element hierarchy.

C#
protected virtual RootRadElement CreateRootElement()
Returns:

RootRadElement

The root element to use for this control.

Disable firing gesture events of the specified type.

C#
public void DisableGesture(GestureType type)
Parameters:typeGestureType

The type of gesture events to disable.

Releases control resources and tears down the element tree and related services.

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

Whether managed resources should be released.

Overrides: Control.Dispose(bool)

Calls the base implementation before disposing the element tree so the designer can serialize the control's properties. Managed cleanup also unregisters key-tip handling and disposes the layout manager, region, and input behavior.

Enable firing gesture events of the specified type.

C#
public void EnableGesture(GestureType type)
Parameters:typeGestureType

The type of gesture events to enable.

Resumes layout.

C#
public virtual void EndInit()

Implements: ISupportInitialize.EndInit()

Reads a public property from an accessible child control or item in response to a Coded UI request.

C#
protected virtual bool FindPropertyInChildren(RadControl radControl, IPCMessage request)
Parameters:radControlRadControl

The control whose accessible children are searched.

requestIPCMessage

The request; Data identifies the child by its accessible name and Message names the property to read.

Returns:

bool

true if a matching child property is found and its value is stored in request.Data; otherwise, false.

Gets the element whose input-key classification is consulted before the control's base implementation.

C#
protected virtual RadElement GetInputElement()
Returns:

RadElement

The currently focused element, or another element supplied by an override.

Gets the DPI scale factor for the monitor where the specified control is currently displayed.

C#
protected virtual SizeF GetMonitorDpiScaleFactor(Control control)
Parameters:controlControl

The control used to determine which monitor to query for DPI information.

Returns:

SizeF

A SizeF representing the DPI scale factor where both Width and Height contain the same scaling value (e.g., 1.25 for 125% scaling, 1.5 for 150% scaling).

This method is used by the RadAutoScale system to determine the target DPI scaling that should be applied to the control. It queries the Windows DPI awareness system to get the effective DPI for the window handle and converts it to a scale factor relative to the standard 96 DPI.

The method is virtual to allow derived controls to customize DPI detection behavior if needed, such as for specialized hosting scenarios or custom DPI handling requirements.

This method requires Windows 10 Anniversary Update (1607) or later for per-monitor DPI awareness support. On earlier versions, the system falls back to other DPI detection methods.

Strips all html tags of the text set to the control and returns only the plain text.

C#
public string GetPlainText()
Returns:

string

Plain text stripped of any html tags.

Gets the preferred size, recalculating it from the element tree when its measurement is stale or the tree contains stretchable elements.

C#
public override Size GetPreferredSize(Size proposedSize)
Parameters:proposedSizeSize

The maximum size available to the control.

Returns:

Size

The preferred size for the proposed constraint.

Overrides: Control.GetPreferredSize(Size)

When the PreferredSize property calls this method with Empty, the current control size is returned.

Performs inner layout for the requested bounds and returns the element tree's desired size.

C#
protected virtual Size GetRootElementDesiredSize(int x, int y, int width, int height)
Parameters:xint

The requested left coordinate.

yint

The requested top coordinate.

widthint

The proposed width for layout.

heightint

The proposed height for layout.

Returns:

Size

The size calculated by the element tree.

Provides an initialization hook for the newly created root element.

C#
protected virtual void InitializeRootElement(RootRadElement rootElement)
Parameters:rootElementRootRadElement

The root element to configure.

This hook runs before the root is attached to the element tree; its stretch settings are saved as defaults immediately afterward, before child elements are created.

Queues a layout callback on the control's UI thread.

C#
public void InvokeLayoutCallback(LayoutCallback callback)
Parameters:callbackLayoutCallback

The callback to run with this control's layout manager.

Implements: ILayoutHandler.InvokeLayoutCallback(LayoutCallback)

The callback is not scheduled unless the control has a handle and is not disposing or disposed.

Lets the focused element classify an input key before using the base control's classification.

C#
protected override bool IsInputKey(Keys keyData)
Parameters:keyDataKeys

The key and modifier data to classify.

Returns:

bool

The focused element's result when it marks the query handled; otherwise, the base control's result.

Overrides: Control.IsInputKey(Keys)

Loads the element tree. While not loaded, no layout operations are allowed upon the tree. By default, the tree will be loaded when the control is displayed for the first time.

C#
public virtual void LoadElementTree()

Implements: IComponentTreeHandler.LoadElementTree()

Loads the element tree using the specified desired size.

C#
public virtual void LoadElementTree(Size desiredSize)
Parameters:desiredSizeSize

Implements: IComponentTreeHandler.LoadElementTree(Size)

Invalidates the cached preferred size and notifies the element tree when auto-size changes.

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

Overrides: Control.OnAutoSizeChanged(EventArgs)

Resets the root element's inherited background color so it picks up the control's updated color.

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

Overrides: Control.OnBackColorChanged(EventArgs)

Copies the control's current binding context to its root element.

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

Overrides: Control.OnBindingContextChanged(EventArgs)

Called when the control receives a capture-change message before it is passed to the base window procedure.

C#
protected virtual void OnCaptureLosing()

The base implementation does nothing; override this method to respond to capture loss.

Gives the element-tree behavior first chance to handle the click before standard control processing.

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

The click event data.

Overrides: Control.OnClick(EventArgs)

Loads the element tree with the control's current size after the WinForms control is created.

C#
protected override void OnCreateControl()

Overrides: Control.OnCreateControl()

Gives the element-tree behavior first chance to handle the double-click before standard control processing.

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

The double-click event data.

Overrides: Control.OnDoubleClick(EventArgs)

Synchronizes the root element's enabled state, updating it before the event when enabling and after when disabling.

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

Overrides: Control.OnEnabledChanged(EventArgs)

Resets the root element's inherited font value so it picks up the control's updated font.

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

Overrides: Control.OnFontChanged(EventArgs)

Resets the root element's inherited foreground color so it picks up the control's updated color.

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

Overrides: Control.OnForeColorChanged(EventArgs)

Forwards the gesture to element behavior and raises the event associated with its gesture type.

C#
protected virtual void OnGesture(GestureEventArgs args)
Parameters:argsGestureEventArgs

The gesture data, including its type, location, and handled state.

An unhandled pan gesture is translated into mouse down, move, or up input according to its begin/end state.

Lets the element-tree behavior restore its previously focused element before standard focus processing.

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

The focus event data.

Overrides: Control.OnGotFocus(EventArgs)

Unloads the element tree unless its disposal flag is set or the handle is being recreated.

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

Overrides: Control.OnHandleDestroyed(EventArgs)

Raises ElementInvalidated with the invalidated element as the event sender.

C#
protected virtual void OnInvalidated(RadElement element)
Parameters:elementRadElement

The element whose bounds need to be repainted.

Gives the element-tree behavior first chance to handle key-down before standard control processing.

C#
protected override void OnKeyDown(KeyEventArgs e)
Parameters:eKeyEventArgs

The key-down event data.

Overrides: Control.OnKeyDown(KeyEventArgs)

Gives the element-tree behavior first chance to handle key-press input before standard control processing.

C#
protected override void OnKeyPress(KeyPressEventArgs e)
Parameters:eKeyPressEventArgs

The key-press event data.

Overrides: Control.OnKeyPress(KeyPressEventArgs)

Gives the element-tree behavior first chance to handle key-up before standard control processing.

C#
protected override void OnKeyUp(KeyEventArgs e)
Parameters:eKeyEventArgs

The key-up event data.

Overrides: Control.OnKeyUp(KeyEventArgs)

Outside design mode, remeasures and updates the root element when the control is loaded, not disposing or resizing, the layout manager is idle, and the root layout is not suspended.

C#
protected override void OnLayout(LayoutEventArgs e)
Parameters:eLayoutEventArgs

Overrides: ScrollableControl.OnLayout(LayoutEventArgs)

Notifies that the control is about to be visualized.

C#
protected virtual void OnLoad(Size desiredSize)
Parameters:desiredSizeSize

Synchronizes the root element's location with the control after the element tree has loaded.

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

Overrides: Control.OnLocationChanged(EventArgs)

Lets the element-tree behavior preserve its focused element before standard focus-loss processing.

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

The focus event data.

Overrides: Control.OnLostFocus(EventArgs)

Forwards the control's capture-changed notification to the element-tree behavior.

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

The mouse-capture event data.

Overrides: Control.OnMouseCaptureChanged(EventArgs)

Gives the element-tree behavior first chance to handle mouse-down before standard control processing.

C#
protected override void OnMouseDown(MouseEventArgs e)
Parameters:eMouseEventArgs

The mouse-down event data.

Overrides: Control.OnMouseDown(MouseEventArgs)

Gives the element-tree behavior first chance to handle mouse-enter before standard control processing.

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

The mouse-enter event data.

Overrides: Control.OnMouseEnter(EventArgs)

Gives the element-tree behavior first chance to handle mouse-hover before standard control processing.

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

The mouse-hover event data.

Overrides: Control.OnMouseHover(EventArgs)

Gives the element-tree behavior first chance to handle mouse-leave before standard control processing.

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

The mouse-leave event data.

Overrides: Control.OnMouseLeave(EventArgs)

Gives the element-tree behavior first chance to handle mouse-move before standard control processing.

C#
protected override void OnMouseMove(MouseEventArgs e)
Parameters:eMouseEventArgs

The mouse-move event data.

Overrides: Control.OnMouseMove(MouseEventArgs)

Gives the element-tree behavior first chance to handle mouse-up before standard control processing.

C#
protected override void OnMouseUp(MouseEventArgs e)
Parameters:eMouseEventArgs

The mouse-up event data.

Overrides: Control.OnMouseUp(MouseEventArgs)

Gives the element-tree behavior first chance to handle mouse-wheel input before standard control processing.

C#
protected override void OnMouseWheel(MouseEventArgs e)
Parameters:eMouseEventArgs

The mouse-wheel event data.

Overrides: ScrollableControl.OnMouseWheel(MouseEventArgs)

Raises PropertyChanged with the supplied change data.

C#
protected virtual void OnNotifyPropertyChanged(PropertyChangedEventArgs e)
Parameters:ePropertyChangedEventArgs

The property-change event data to pass to subscribers.

Raises the PropertyChanged event

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

The name of the property

Converts the control's padding to the root element's DPI-unscaled coordinates and applies it to the root and its first child.

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

Overrides: ScrollableControl.OnPaddingChanged(EventArgs)

Paints the root element in the clip rectangle before raising the control's standard paint event.

C#
protected override void OnPaint(PaintEventArgs e)
Parameters:ePaintEventArgs

Overrides: Control.OnPaint(PaintEventArgs)

Fires the PanGesture event.

C#
protected virtual void OnPanGesture(PanGestureEventArgs args)
Parameters:argsPanGestureEventArgs

The arguments for the PanGesture event.

Refreshes inherited root-element colors and font, then attempts Telerik auto-scaling after the parent changes.

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

Overrides: Control.OnParentChanged(EventArgs)

Fires the PressAndTapGesture event.

C#
protected virtual void OnPressAndTapGesture(PressAndTapGestureEventArgs args)
Parameters:argsPressAndTapGestureEventArgs

The arguments for the PressAndTapGesture event.

Gives the element-tree behavior first chance to classify a key before standard preview-key processing.

C#
protected override void OnPreviewKeyDown(PreviewKeyDownEventArgs e)
Parameters:ePreviewKeyDownEventArgs

The preview-key event data.

Overrides: Control.OnPreviewKeyDown(PreviewKeyDownEventArgs)

Recomputes the root element's effective right-to-left setting after the control's setting changes.

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

Overrides: ScrollableControl.OnRightToLeftChanged(EventArgs)

Fires the RotateGesture event.

C#
protected virtual void OnRotateGesture(RotateGestureEventArgs args)
Parameters:argsRotateGestureEventArgs

The arguments for the RotateGesture event.

Raises the screen-tip event so handlers can adjust the display delay and offset.

C#
protected virtual void OnScreenTipNeeded(object sender, ScreenTipNeededEventArgs e)
Parameters:senderobject

The component behavior requesting screen-tip data.

eScreenTipNeededEventArgs

The screen-tip target, display delay, and offset.

Reapplies background and foreground theme overrides for colors that are explicitly set on the control.

C#
protected virtual void OnThemeChanged()

Raises ThemeNameChanged when the element tree's theme name changes.

C#
protected virtual void OnThemeNameChanged(ThemeNameChangedEventArgs e)
Parameters:eThemeNameChangedEventArgs

The previous and current theme names.

Raises the tooltip-text event so handlers can adjust the text and cursor offset before display.

C#
protected virtual void OnToolTipTextNeeded(object sender, ToolTipTextNeededEventArgs e)
Parameters:senderobject

The element requesting tooltip text.

eToolTipTextNeededEventArgs

The current tooltip text and cursor offset, which handlers can modify.

Fires the TwoFingerTapGesture event.

C#
protected virtual void OnTwoFingerTapGesture(GestureEventArgs args)
Parameters:argsGestureEventArgs

The arguments for the TwoFingerTapGesture event.

Attempts Telerik auto-scaling and repaints the root-element shadow after visibility changes.

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

Overrides: ScrollableControl.OnVisibleChanged(EventArgs)

Fires the ZoomGesture event.

C#
protected virtual void OnZoomGesture(ZoomGestureEventArgs args)
Parameters:argsZoomGestureEventArgs

The arguments for the ZoomGesture event.

Performs auto scaling of the control.

C#
protected virtual void PerformRadAutoScale(BoundsSpecified? specified = null)
Parameters:specifiedBoundsSpecified?

Updates the root element's default stretch modes when the control's AutoSize value changes.

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

The new value of AutoSize.

Stretch modes are changed only when the root element is auto-sized; each is set to the inverse of value and saved as its default.

Processes a capture request from the specified element.

C#
protected virtual bool ProcessCaptureChangeRequested(RadElement element, bool capture)
Parameters:elementRadElement

The element which requested the capture.

capturebool
Returns:

bool

True if the capture request is approved, otherwise false.

Processes supported Coded UI property requests for this control and its accessible children.

C#
protected virtual void ProcessCodedUIMessage(ref IPCMessage request)
Parameters:requestIPCMessage

The property request. Message names the property; Data supplies a set value or, for a get, may identify a child before receiving the result.

The base implementation uses public properties on the control or accessible child; it does not handle ExecuteMethod requests.

Processes a focus request from the specified element.

C#
protected virtual bool ProcessFocusRequested(RadElement element)
Parameters:elementRadElement

The element that requested the focus.

Returns:

bool

True if focus is approved, false otherwise.

Reads gesture data from a window message and dispatches supported gestures through OnGesture(GestureEventArgs).

C#
protected bool ProcessGesture(Message m)
Parameters:mMessage

The window message containing gesture information.

Returns:

bool

true when the message is consumed; false when gestures are unavailable or disabled, gesture information cannot be read, or the message is a gesture-sequence begin/end marker.

Other unrecognized gesture identifiers are consumed without raising a gesture event.

Processes a mnemonic through the element-tree behavior when mnemonic processing is allowed and the control or one of its elements has focus.

C#
protected override bool ProcessMnemonic(char charCode)
Parameters:charCodechar

The mnemonic character to process.

Returns:

bool

true if the behavior or base control processes the mnemonic; otherwise, false.

Overrides: Control.ProcessMnemonic(char)

Refreshes the control unless an update suspension is active.

C#
public override void Refresh()

Overrides: Control.Refresh()

Adds the WinForms control hosted by a RadHostItem to this control's child controls.

C#
public virtual void RegisterHostedControl(RadHostItem hostElement)
Parameters:hostElementRadHostItem

The element whose hosted control should be added.

Implements: IComponentTreeHandler.RegisterHostedControl(RadHostItem)

A null element or one whose hosted control is already parented to this control is ignored. Layout is suspended during the addition; the host element is responsible for positioning its hosted control.

Lets derived controls clear child-element theme overrides when BackColor is reset to Empty.

C#
protected virtual void ResetBackColorThemeOverrides()

Lets derived controls clear child-element theme overrides when ForeColor is reset to Empty.

C#
protected virtual void ResetForeColorThemeOverrides()

Reset the property to its default value.

C#
protected virtual void ResetProperty(RadProperty property, RadObject element)
Parameters:propertyRadProperty

The RadProperty to be reset.

elementRadObject

The RadObject owner of the property.

Replaces the default style group for specific element.

C#
public virtual StyleGroup ResolveStyleGroupForElement(StyleGroup styleGroup, RadObject element)
Parameters:styleGroupStyleGroup

The style group to replace.

elementRadObject

The element on which this style should apply.

Returns:

StyleGroup

An instance of StyleGroup is successfull.

Ends one update suspension and invalidates the control and its child controls when the outermost suspension ends.

C#
public void ResumeUpdate()

Implements: IComponentTreeHandler.ResumeUpdate()

Ends one update suspension and optionally invalidates the control when the outermost suspension ends.

C#
public void ResumeUpdate(bool invalidate)
Parameters:invalidatebool

true to invalidate the control and its child controls; otherwise, leave them unchanged.

Calling this without an active suspension is a no-op.

Applies Telerik auto-scaling when enabled; otherwise scales the root element for size changes and delegates to WinForms.

C#
protected override void ScaleControl(SizeF factor, BoundsSpecified specified)
Parameters:factorSizeF

The horizontal and vertical scale factors.

specifiedBoundsSpecified

The bounds components to scale.

Overrides: ScrollableControl.ScaleControl(SizeF, BoundsSpecified)

Outside Telerik auto-scaling, an unchanged factor or disabled DPI scaling returns without calling the base implementation. When Telerik auto-scaling is enabled, this method delegates to that path, which may re-enter with a calculated factor. During WinForms scaling, bottom and right anchors are temporarily cleared and then restored.

Lets derived controls propagate an explicit BackColor to theme values for their child elements.

C#
protected virtual void SetBackColorThemeOverrides()

Called after a non-empty color is assigned and again after a theme change while the color remains explicit.

Applies the requested bounds, using the element tree's desired size for a loaded control whose bounds are changing.

C#
protected override void SetBoundsCore(int x, int y, int width, int height, BoundsSpecified specified)
Parameters:xint

The requested left coordinate.

yint

The requested top coordinate.

widthint

The requested width.

heightint

The requested height.

specifiedBoundsSpecified

The bounds components to apply.

Overrides: Control.SetBoundsCore(int, int, int, int, BoundsSpecified)

Lets derived controls propagate an explicit ForeColor to theme values for their child elements.

C#
protected virtual void SetForeColorThemeOverrides()

Called after a non-empty color is assigned and again after a theme change while the color remains explicit.

Enables/disables RadAutoScale. If you want to disable RadAutoScale for this control, call this method immediately after creating the control.

C#
public void SetRadAutoScale(bool isEnabled)
Parameters:isEnabledbool

Determines whether the specified RadProperty should be serialized. Prevents theme and default values serialization.

C#
protected virtual bool ShouldSerializeProperty(RadProperty property, RadObject element)
Parameters:propertyRadProperty

The RadProperty that is about to be serialized.

elementRadObject

The element that owns the property.

Returns:

bool

A value indicating whether to serialize the property value.

Determines whether the specified RadProperty should be serialized.

C#
protected virtual bool ShouldSerializeProperty(RadProperty property)
Parameters:propertyRadProperty

The RadProperty that is about to be serialized.

Returns:

bool

A value indicating whether to serialize the property value.

Suspends automatic invalidation and refresh work for this control's element tree.

C#
public void SuspendUpdate()

Implements: IComponentTreeHandler.SuspendUpdate()

Suspensions are nested; pair each call with ResumeUpdate(). This does not suspend layout; it suppresses element invalidation and Refresh() calls.

Updates the parent-layout state for a hosted control and optionally removes it from this control.

C#
public virtual void UnregisterHostedControl(RadHostItem hostElement, bool removeControl)
Parameters:hostElementRadHostItem

The element whose hosted control is being unregistered.

removeControlbool

true to remove the hosted control from this control when it is currently parented here; false to leave it in the child-controls collection.

Implements: IComponentTreeHandler.UnregisterHostedControl(RadHostItem, bool)

If the hosted control is parented here and the element tree's layout is suspended, its layout is resumed regardless of whether it is removed. This control's layout is suspended during the operation and resumed without forcing a layout pass.

Processes window messages, routing Telerik-specific input and IPC handling before delegating unhandled messages.

C#
protected override void WndProc(ref Message m)
Parameters:mMessage

The window message to process.

Overrides: ScrollableControl.WndProc(ref Message)

This path includes gesture dispatch and validation-aware focus handling. Messages not consumed by a Telerik-specific path are passed to the base window procedure.

Events

Occurs when an element requests invalidation while the control is visible and updates are not suspended; bounds-specific requests are also suppressed during painting.

C#
public event EventHandler ElementInvalidated

Handlers receive the invalidated RadElement as sender; the event arguments are null.

Fires when the control is initialized.

C#
public event EventHandler Initialized

Implements: ISupportInitializeNotification.Initialized

Occurs when a pan gesture was sent by a touch input device.

C#
[Browsable(true)]
public event PanGestureEventHandler PanGesture

Occurs when a press-and-tap gesture was sent by a touch input device.

C#
[Browsable(true)]
public event PressAndTapGestureEventHandler PressAndTapGesture

Occurs when a property of an object changes change. Calling the event is developer's responsibility.

C#
[Browsable(false)]
public event PropertyChangedEventHandler PropertyChanged

Implements: INotifyPropertyChanged.PropertyChanged

Occurs when a rotate gesture was sent by a touch input device.

C#
[Browsable(true)]
public event RotateGestureEventHandler RotateGesture

Occurs prior the ScreenTip of a RadItem instance inside the RadControl is displayed.

C#
public virtual event ScreenTipNeededEventHandler ScreenTipNeeded

Fires when the theme name is changed.

C#
public event ThemeNameChangedEventHandler ThemeNameChanged

Implements: IComponentTreeHandler.ThemeNameChanged

Occurs when a RadItem instance inside the RadControl requires ToolTip text.

C#
public virtual event ToolTipTextNeededEventHandler ToolTipTextNeeded

Implements: IComponentTreeHandler.ToolTipTextNeeded

Occurs when a two-finger-tap gesture was sent by a touch input device.

C#
[Browsable(true)]
public event GestureEventHandler TwoFingerTapGesture

Occurs when a zoom gesture was sent by a touch input device.

C#
[Browsable(true)]
public event ZoomGestureEventHandler ZoomGesture
In this article
DefinitionConstructorsRadControl()FieldsinvalidResizeRectisAccessibilityRequestedisDisposing2isResizing2PropertiesAllowShowFocusCuesAnalyticsNameAutoSizeBackColorBehaviorCausesValidationCommandBindingsElementTreeEnableAnalyticsEnableCodedUITestsEnableCodedUITestsDefaultValueEnableDpiScalingEnableImageDpiScalingEnableKeyMapEnableRadAccessibilityObjectsEnableRadAutoScaleEnableRadFormInitialDpiScalingEnableSvgImagesEnableThemingEnableUIAutomationEnableUIAutomationDefaultValueFocusableFocusedElementFontForeColorImageListImageScalingSizeIsDesignModeIsDisplayedIsInitializingIsLoadedMaximumSizeMinimumSizePaddingRootElementShowItemToolTipsSiteSmallImageListSmallImageScalingSizeTextThemeClassNameThemeNameUseCompatibleTextRenderingUseCompatibleTextRenderingDefaultValueValidationCancelMethodsBeginInit()CanEditElementAtDesignTime(RadElement)Construct()CreateBehavior()CreateChildItems(RadElement)CreateRootElement()DisableGesture(GestureType)Dispose(bool)EnableGesture(GestureType)EndInit()FindPropertyInChildren(RadControl, IPCMessage)GetInputElement()GetMonitorDpiScaleFactor(Control)GetPlainText()GetPreferredSize(Size)GetRootElementDesiredSize(int, int, int, int)InitializeRootElement(RootRadElement)InvokeLayoutCallback(LayoutCallback)IsInputKey(Keys)LoadElementTree()LoadElementTree(Size)OnAutoSizeChanged(EventArgs)OnBackColorChanged(EventArgs)OnBindingContextChanged(EventArgs)OnCaptureLosing()OnClick(EventArgs)OnCreateControl()OnDoubleClick(EventArgs)OnEnabledChanged(EventArgs)OnFontChanged(EventArgs)OnForeColorChanged(EventArgs)OnGesture(GestureEventArgs)OnGotFocus(EventArgs)OnHandleDestroyed(EventArgs)OnInvalidated(RadElement)OnKeyDown(KeyEventArgs)OnKeyPress(KeyPressEventArgs)OnKeyUp(KeyEventArgs)OnLayout(LayoutEventArgs)OnLoad(Size)OnLocationChanged(EventArgs)OnLostFocus(EventArgs)OnMouseCaptureChanged(EventArgs)OnMouseDown(MouseEventArgs)OnMouseEnter(EventArgs)OnMouseHover(EventArgs)OnMouseLeave(EventArgs)OnMouseMove(MouseEventArgs)OnMouseUp(MouseEventArgs)OnMouseWheel(MouseEventArgs)OnNotifyPropertyChanged(PropertyChangedEventArgs)OnNotifyPropertyChanged(string)OnPaddingChanged(EventArgs)OnPaint(PaintEventArgs)OnPanGesture(PanGestureEventArgs)OnParentChanged(EventArgs)OnPressAndTapGesture(PressAndTapGestureEventArgs)OnPreviewKeyDown(PreviewKeyDownEventArgs)OnRightToLeftChanged(EventArgs)OnRotateGesture(RotateGestureEventArgs)OnScreenTipNeeded(object, ScreenTipNeededEventArgs)OnThemeChanged()OnThemeNameChanged(ThemeNameChangedEventArgs)OnToolTipTextNeeded(object, ToolTipTextNeededEventArgs)OnTwoFingerTapGesture(GestureEventArgs)OnVisibleChanged(EventArgs)OnZoomGesture(ZoomGestureEventArgs)PerformRadAutoScale(BoundsSpecified?)ProcessAutoSizeChanged(bool)ProcessCaptureChangeRequested(RadElement, bool)ProcessCodedUIMessage(ref IPCMessage)ProcessFocusRequested(RadElement)ProcessGesture(Message)ProcessMnemonic(char)Refresh()RegisterHostedControl(RadHostItem)ResetBackColorThemeOverrides()ResetForeColorThemeOverrides()ResetProperty(RadProperty, RadObject)ResolveStyleGroupForElement(StyleGroup, RadObject)ResumeUpdate()ResumeUpdate(bool)ScaleControl(SizeF, BoundsSpecified)SetBackColorThemeOverrides()SetBoundsCore(int, int, int, int, BoundsSpecified)SetForeColorThemeOverrides()SetRadAutoScale(bool)ShouldSerializeProperty(RadProperty, RadObject)ShouldSerializeProperty(RadProperty)SuspendUpdate()UnregisterHostedControl(RadHostItem, bool)WndProc(ref Message)EventsElementInvalidatedInitializedPanGesturePressAndTapGesturePropertyChangedRotateGestureScreenTipNeededThemeNameChangedToolTipTextNeededTwoFingerTapGestureZoomGesture
Not finding the help you need?
Contact Support