Class
RadHostItem

Represents a RadItem that can host any external Windows Forms control, providing seamless integration between standard Windows Forms controls and the Telerik Presentation Framework.

Definition

Namespace:Telerik.WinControls

Assembly:Telerik.WinControls.dll

Syntax:

cs-api-definition
public class RadHostItem : RadItem, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode

Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemRadHostItem

Derived Classes: GridViewHostItemRadWebBrowserItem

Implements: IBindableComponentIComponentICustomTypeDescriptorIDisposableINotifyPropertyChangedIShortcutProviderIStylableElementIStylableNodeISupportDragISupportDropISupportSystemSkin

Inherited Members RadItem.KeyDownEventRadItem.KeyPressEventRadItem.KeyUpEventRadItem.FocusCommandRadItem.ActionCommandRadItem.UseDefaultDisabledPaintPropertyRadItem.TextPropertyRadItem.TextOrientationPropertyRadItem.FlipTextPropertyRadItem.IsAddNewItemPropertyRadItem.ToolTipTextPropertyRadItem.EnableElementShadowPropertyRadItem.ShadowDepthPropertyRadItem.ShadowColorPropertyRadItem.IsPaintingRippleRadItem.EnableRippleAnimationPropertyRadItem.RippleAnimationColorPropertyRadItem.EnableFocusBorderPropertyRadItem.FocusBorderColorPropertyRadItem.FocusBorderWidthPropertyRadItem.EnableFocusBorderAnimationPropertyRadItem.EnableHighlightPropertyRadItem.HighlightColorPropertyRadItem.EnableBorderHighlightPropertyRadItem.BorderHighlightColorPropertyRadItem.BorderHighlightThicknessPropertyRadItem.VisualStatePropertyRadItem.SetOwnerCollection(RadItemOwnerCollection)RadItem.Select()RadItem.OnSelect()RadItem.Deselect()RadItem.OnDeselect()RadItem.DoKeyDown(KeyEventArgs)RadItem.DoKeyPress(KeyPressEventArgs)RadItem.DoKeyUp(KeyEventArgs)RadItem.OnKeyDown(KeyEventArgs)RadItem.OnKeyPress(KeyPressEventArgs)RadItem.OnKeyUp(KeyEventArgs)RadItem.RaiseBubbleEvent(RadElement, RoutedEventArgs)RadItem.OnPropertyChanging(RadPropertyChangingEventArgs)RadItem.OnEnabledChanged(RadPropertyChangedEventArgs)RadItem.OnTextChanging(TextChangingEventArgs)RadItem.OnTextChanged(EventArgs)RadItem.OnTextOrientationChanged(EventArgs)RadItem.OnFlipTextChanged(EventArgs)RadItem.PaintOverride(IGraphics, Rectangle, float, SizeF, bool)RadItem.OnMouseDown(MouseEventArgs)RadItem.OnMouseUp(MouseEventArgs)RadItem.OnMouseMove(MouseEventArgs)RadItem.OnMouseLeave(EventArgs)RadItem.StartRippleAnimation(MouseEventArgs)RadItem.UpdateFocusBorder(bool)RadItem.ContainsText()RadItem.ShouldSerializeProperty(PropertyDescriptor)RadItem.ProcessDialogKey(Keys)RadItem.ProcessCmdKey(ref Message, Keys)RadItem.RaiseKeyDown(KeyEventArgs)RadItem.RaiseKeyPress(KeyPressEventArgs)RadItem.RaiseKeyUp(KeyEventArgs)RadItem.ReplaceDefaultDescriptors(PropertyDescriptorCollection)RadItem.CallOnGesture(GestureEventArgs)RadItem.OnGesture(GestureEventArgs)RadItem.OnTwoFingerTapGesture(GestureEventArgs)RadItem.OnPressAndTapGesture(PressAndTapGestureEventArgs)RadItem.OnPanGesture(PanGestureEventArgs)RadItem.OnRotateGesture(RotateGestureEventArgs)RadItem.OnZoomGesture(ZoomGestureEventArgs)RadItem.CanDragCore(Point)RadItem.GetDragContextCore()RadItem.GetDragHintCore()RadItem.ProcessDragDrop(Point, ISupportDrag)RadItem.ProcessDragOver(Point, ISupportDrag)RadItem.ProcessDragEnter(Point, ISupportDrag)RadItem.ProcessDragLeave(Point, ISupportDrag)RadItem.UpdateOnShortcutsChanged()RadItem.CanHandleShortcut(ShortcutEventArgs)RadItem.IsOnActiveForm(Control, bool)RadItem.SetThemeValueOverride(RadProperty, object, string)RadItem.SetThemeValueOverride(RadProperty, object, string, string)RadItem.SetThemeValueOverride(RadProperty, object, string, Type)RadItem.ResetThemeValueOverride(RadProperty)RadItem.ResetThemeValueOverride(RadProperty, string)RadItem.ResetThemeValueOverrides()RadItem.GetAvailableVisualStates()RadItem.ShouldFallbackToDefaultTheme()RadItem.UseDefaultDisabledPaintRadItem.TextOrientationRadItem.FlipTextRadItem.CanHaveOwnStyleRadItem.TextRadItem.SelectableRadItem.DefaultAutoToolTipRadItem.ShouldHandleMouseInputRadItem.KeyTipRadItem.ParentItemRadItem.ShortcutsHandlerRadItem.EnableElementShadowRadItem.ShadowDepthRadItem.ShadowColorRadItem.EnableRippleAnimationRadItem.RippleAnimationColorRadItem.EnableFocusBorderRadItem.FocusBorderColorRadItem.FocusBorderWidthRadItem.EnableFocusBorderAnimationRadItem.EnableHighlightRadItem.HighlightColorRadItem.EnableBorderHighlightRadItem.BorderHighlightColorRadItem.BorderHighlightThicknessRadItem.MnemonicTextRadItem.ToolTipTextRadItem.ThemeRoleRadItem.VisualStateRadItem.StateManagerRadItem.AllowDragRadItem.AllowDropRadItem.ShortcutsRadItem.AccessibleDescriptionRadItem.AccessibleNameRadItem.AccessibleRoleRadItem.TextChangingRadItem.TextChangedRadItem.TextOrientationChangedRadItem.FlipTextChangedRadItem.QueryAccessibilityHelpRadItem.KeyDownRadItem.KeyPressRadItem.KeyUpRadItem.ZoomGestureRadItem.RotateGestureRadItem.PanGestureRadItem.TwoFingerTapGestureRadItem.PressAndTapGestureRadComponentElement.ToString()RadComponentElement.GetService(Type)RadComponentElement.CanRaiseEventsRadComponentElement.ContainerRadComponentElement.DesignModeRadComponentElement.SiteRadComponentElement.DataBindingsVisualElement.DefaultSizePropertyVisualElement.ForeColorPropertyVisualElement.BackColorPropertyVisualElement.FontPropertyVisualElement.SmoothingModePropertyVisualElement.OpacityPropertyVisualElement.CustomFontPropertyVisualElement.CustomFontSizePropertyVisualElement.CustomFontStylePropertyVisualElement.OnFontChanged(EventArgs)VisualElement.PaintElement(IGraphics, float, SizeF)VisualElement.PaintChildren(IGraphics, Rectangle, float, SizeF, bool)VisualElement.PrePaintElement(IGraphics)VisualElement.PostPaintElement(IGraphics)VisualElement.GetScaledFont(float)VisualElement.GetScaledFont(float, Font)VisualElement.DefaultSizeVisualElement.ForeColorVisualElement.BackColorVisualElement.FontVisualElement.CustomFontVisualElement.CustomFontSizeVisualElement.CustomFontStyleVisualElement.SmoothingModeVisualElement.OpacityVisualElement.FontChangedRadElement.BoundsPropertyRadElement.BorderThicknessPropertyRadElement.PaddingPropertyRadElement.MarginPropertyRadElement.AlignmentPropertyRadElement.AutoSizeModePropertyRadElement.FitToSizeModePropertyRadElement.MinSizePropertyRadElement.EnabledPropertyRadElement.CanFocusPropertyRadElement.IsItemFocusedPropertyRadElement.IsFocusedPropertyRadElement.IsMouseOverPropertyRadElement.IsMouseOverElementPropertyRadElement.IsMouseDownPropertyRadElement.ShouldPaintPropertyRadElement.VisibilityPropertyRadElement.NamePropertyRadElement.ClassPropertyRadElement.ClipDrawingPropertyRadElement.ShapePropertyRadElement.MouseClickedEventRadElement.MouseDoubleClickedEventRadElement.MouseDownEventRadElement.MouseUpEventRadElement.MouseWheelEventRadElement.ChildElementAddedEventRadElement.ParentChangedEventRadElement.BoundsChangedEventRadElement.VisibilityChangingEventRadElement.EnabledChangedEventRadElement.ControlChangedEventRadElement.BackgroundShapePropertyRadElement.BackgroundShapePaintModePropertyRadElement.ContainsFocusPropertyRadElement.ContainsMousePropertyRadElement.MaxSizePropertyRadElement.RightToLeftPropertyRadElement.AutoSizePropertyRadElement.ZIndexPropertyRadElement.AngleTransformPropertyRadElement.ScaleTransformPropertyRadElement.PositionOffsetPropertyRadElement.TagPropertyRadElement.StretchHorizontallyPropertyRadElement.StretchVerticallyPropertyRadElement.UseCompatibleTextRenderingPropertyRadElement.ClickModePropertyRadElement.styleVersionRadElement.paintSystemSkinRadElement.SetPropertyValueCommandRadElement.GetPropertyValueCommandRadElement.StylePropertyRadElement.CallCreateChildElements()RadElement.SuspendReferenceUpdate()RadElement.ResumeReferenceUpdate()RadElement.CreateChildElements()RadElement.OnLoad(bool)RadElement.LoadCore()RadElement.OnUnload(ComponentThemableElementTree, bool)RadElement.UnloadCore(ComponentThemableElementTree)RadElement.OnUnloaded(ComponentThemableElementTree)RadElement.OnBeginDispose()RadElement.SetParent(RadElement)RadElement.OnParentChanged(RadElement)RadElement.UpdateReferences(ComponentThemableElementTree, bool, bool)RadElement.ResetLayout(bool)RadElement.HasInvisibleAncestor()RadElement.ResetLayoutCore()RadElement.InvalidateArrange()RadElement.InvalidateArrange(bool)RadElement.InvalidateMeasure()RadElement.InvalidateMeasure(bool)RadElement.UpdateLayout()RadElement.SuspendLayout()RadElement.SuspendLayout(bool)RadElement.ResumeLayout(bool)RadElement.ResumeLayout(bool, bool)RadElement.Arrange(RectangleF)RadElement.Measure(SizeF)RadElement.SetBounds(Rectangle)RadElement.SetBounds(int, int, int, int)RadElement.GetBoundingRectangle(Size)RadElement.GetBoundingRectangle(Rectangle)RadElement.GetDesiredSize(bool)RadElement.PointToScreen(Point)RadElement.PointFromScreen(Point)RadElement.PointToControl(Point)RadElement.PointFromControl(Point)RadElement.LocationToControl()RadElement.RectangleToScreen(Rectangle)RadElement.HitTest(Point)RadElement.OnRenderSizeChanged(SizeChangedInfo)RadElement.OnChildDesiredSizeChanged(RadElement)RadElement.OnLayoutPropertyChanged(RadPropertyChangedEventArgs)RadElement.MeasureCore(SizeF)RadElement.ShouldArrangeChild(RadElement)RadElement.ArrangeOverride(SizeF)RadElement.ShouldMeasureChild(RadElement)RadElement.MeasureChildren(SizeF)RadElement.GetArrangeRect(RectangleF)RadElement.CanExecuteLayoutOperation()RadElement.CalcLayoutOffset(PointF)RadElement.LockBounds()RadElement.UnlockBounds()RadElement.SetBoundsCore(Rectangle)RadElement.IsInValidState(bool)RadElement.Invalidate()RadElement.Invalidate(bool)RadElement.GetInvalidateBounds()RadElement.NotifyInvalidate(RadElement)RadElement.PerformLayoutTransformation(ref RadMatrix)RadElement.PerformPaintTransformation(ref RadMatrix)RadElement.IsInGetAsBitmap()RadElement.PaintElementSkin(IGraphics)RadElement.PaintBackgroundShape(IGraphics)RadElement.PostPaintChildren(IGraphics, Rectangle, float, SizeF)RadElement.PaintChild(RadElement, IGraphics, Rectangle, float, SizeF, bool)RadElement.PaintShadow(RadElement, IGraphics)RadElement.PaintShadowCore(Graphics, Rectangle, RadItem)RadElement.GetShadowRect(ref Rectangle, int)RadElement.PaintFocusCues(IGraphics, Rectangle)RadElement.GetAsBitmap(IGraphics, Brush, float, SizeF)RadElement.GetAsTransformedBitmap(IGraphics, Brush, float, SizeF)RadElement.GetAsTransformedBitmap(Brush, float, SizeF)RadElement.GetAsTransformedBitmap(Rectangle, Brush, float, SizeF)RadElement.GetAsBitmapEx(Color, float, SizeF)RadElement.GetAsBitmapEx(Brush, float, SizeF)RadElement.GetAsBitmap(Brush, float, SizeF)RadElement.IsInVisibleClipBounds(Rectangle)RadElement.SetClipping(Graphics)RadElement.GetClipRect()RadElement.ShouldPaintChild(RadElement)RadElement.GetFocusRect()RadElement.GetCurrentShape()RadElement.GetPaintRectangle(float, float, SizeF)RadElement.GetPatchedRect(RectangleF, float, SizeF)RadElement.GetXPVisualStyle()RadElement.GetVistaVisualStyle()RadElement.InitializeSystemSkinPaint()RadElement.UnitializeSystemSkinPaint()RadElement.GetSystemSkinPaintBounds()RadElement.OnUseSystemSkinChanged(EventArgs)RadElement.ShouldPaintSystemSkin()RadElement.ComposeShouldPaintSystemSkin()RadElement.GetStylablePropertiesFilter()RadElement.ResetStyleSettings(bool)RadElement.ResetStyleSettings(bool, RadProperty)RadElement.ProcessBehaviors(RadPropertyChangedEventArgs)RadElement.AddBehavior(PropertyChangeBehavior)RadElement.GetBehaviors()RadElement.RemoveBehavior(PropertyChangeBehavior)RadElement.ClearBehaviors()RadElement.AddRangeBehavior(PropertyChangeBehaviorCollection)RadElement.SetThemeApplied(bool)RadElement.OnStyleChanged(RadPropertyChangedEventArgs)RadElement.UnapplyStyle()RadElement.RemoveRangeBehaviors(PropertyChangeBehaviorCollection)RadElement.RemoveBehaviors(PropertyChangeBehavior)RadElement.RemoveRangeRoutedEventBehaviors(RoutedEventBehaviorCollection)RadElement.GetThemeEffectiveType()RadElement.GetChildrenByType(Type)RadElement.GetChildrenByBaseType(Type)RadElement.FindAncestorByThemeEffectiveType(Type)RadElement.FindAncestor<T>()RadElement.IsAncestorOf(RadElement)RadElement.FindDescendant<T>()RadElement.FindDescendant(Predicate<RadElement>)RadElement.FindDescendant(Type)RadElement.EnumDescendants(TreeTraversalMode)RadElement.EnumDescendants(Predicate<RadElement>, TreeTraversalMode)RadElement.EnumDescendants(Filter, TreeTraversalMode)RadElement.GetDescendants(Predicate<RadElement>, TreeTraversalMode)RadElement.GetDescendants(Filter, TreeTraversalMode)RadElement.GetAncestors(Filter)RadElement.GetAncestors(Predicate<RadElement>)RadElement.RaiseRoutedEvent(RadElement, RoutedEventArgs)RadElement.RaiseTunnelEvent(RadElement, RoutedEventArgs)RadElement.OnBubbleEvent(RadElement, RoutedEventArgs)RadElement.IsEventInProcess(RaisedRoutedEvent)RadElement.RegisterRoutedEvent(string, Type)RadElement.GetRegisterRoutedEvent(string, Type)RadElement.GetRegisterRoutedEvent(string, string)RadElement.GetRegisterRoutedEvent(string)RadElement.OnChildrenChanged(RadElement, ItemsChangeOperation)RadElement.GetChildren(ChildrenListOptions)RadElement.SendToBack()RadElement.BringToFront()RadElement.IsChildOf(RadElement)RadElement.Focus(bool)RadElement.SetFocusPropertySafe(bool)RadElement.KillFocus()RadElement.OnCLREventsRise(RoutedEventArgs)RadElement.OnMouseHover(EventArgs)RadElement.OnParentEnabledChanged(RadPropertyChangedEventArgs)RadElement.OnLostMouseCapture(MouseEventArgs)RadElement.OnClick(EventArgs)RadElement.OnDoubleClick(EventArgs)RadElement.OnMouseEnter(EventArgs)RadElement.PerformClick()RadElement.OnMouseWheel(MouseEventArgs)RadElement.DoMouseWheel(MouseEventArgs)RadElement.DoClick(EventArgs)RadElement.DoDoubleClick(EventArgs)RadElement.IsInputKey(InputKeyEventArgs)RadElement.MouseEventArgsFromControl(MouseEventArgs)RadElement.DoMouseDown(MouseEventArgs)RadElement.DoMouseUp(MouseEventArgs)RadElement.DoMouseMove(MouseEventArgs)RadElement.ShowScreenTip(ScreenTipNeededEventArgs)RadElement.HideScreenTip()RadElement.DoMouseHover(EventArgs)RadElement.OnShowScreenTip(ComponentInputBehavior)RadElement.RaiseClick(EventArgs)RadElement.RaiseDoubleClick(EventArgs)RadElement.RaiseMouseWheel(MouseEventArgs)RadElement.UpdateContainsFocus(bool)RadElement.DoMouseEnter(EventArgs)RadElement.DoMouseLeave(EventArgs)RadElement.GetValue(RadProperty)RadElement.AddStylePropertySetting(IPropertySetting)RadElement.SetValueCore(RadPropertyValue, object, object, ValueSource)RadElement.NotifyChildren(RadPropertyChangedEventArgs)RadElement.OnBoundsChanged(RadPropertyChangedEventArgs)RadElement.OnLocationChanged(RadPropertyChangedEventArgs)RadElement.OnDisplayPropertyChanged(RadPropertyChangedEventArgs)RadElement.CanRaisePropertyChangeNotifications(RadPropertyValue)RadElement.IsPropertyCancelable(RadPropertyMetadata)RadElement.OnParentPropertyChanged(RadPropertyChangedEventArgs)RadElement.PerformDispose(bool)RadElement.DisposeChildren()RadElement.GetStylableChildrenHierarchy()RadElement.GetStylableChildren()RadElement.GetClientRectangle(SizeF)RadElement.GetBorderThickness(BorderPrimitive)RadElement.ElementStateRadElement.DesiredSizeRadElement.IsLayoutSuspendedRadElement.BoundingRectangleRadElement.ControlBoundingRectangleRadElement.BypassLayoutPoliciesRadElement.IsArrangeValidRadElement.IsMeasureValidRadElement.TreeLevelRadElement.TransformRadElement.TotalTransformRadElement.ShouldPaintUsingParentShapeRadElement.UseSystemSkinRadElement.PropagateStyleToChildrenRadElement.ThemeEffectiveTypeRadElement.ElementTreeRadElement.ChildrenRadElement.ChildrenHierarchyRadElement.ParentRadElement.RoutedEventBehaviorsRadElement.LayoutableChildrenCountRadElement.ContainsFocusRadElement.NotifyParentOnMouseInputRadElement.IsAbleToRespondToMouseEventsRadElement.AutoSizeRadElement.BoundsRadElement.LocationRadElement.SizeRadElement.BorderThicknessRadElement.PaddingRadElement.MarginRadElement.AlignmentRadElement.AutoSizeModeRadElement.FitToSizeModeRadElement.CanFocusRadElement.IsFocusedRadElement.IsMouseOverRadElement.IsMouseOverElementRadElement.IsMouseDownRadElement.InvalidateChildrenOnChildChangedRadElement.ShouldPaintRadElement.VisibilityRadElement.IsElementVisibleRadElement.NameRadElement.ClassRadElement.ClipDrawingRadElement.ShapeRadElement.MinSizeRadElement.MaxSizeRadElement.ZIndexRadElement.RightToLeftRadElement.UseCompatibleTextRenderingRadElement.BackgroundShapeRadElement.BackgroundShapePaintModeRadElement.ContainsMouseRadElement.CaptureRadElement.ScaleTransformRadElement.AngleTransformRadElement.PositionOffsetRadElement.SerializePropertiesRadElement.SerializeElementRadElement.SerializeChildrenRadElement.RenderingMaxFramerateRadElement.IsThemeAppliedRadElement.ShouldApplyThemeRadElement.UseCenteredAngleTransformRadElement.TagRadElement.StretchHorizontallyRadElement.StretchVerticallyRadElement.ClickModeRadElement.DoubleClickEnabledRadElement.CaptureOnMouseDownRadElement.IsItemHoveredRadElement.StyleRadElement.AutoToolTipRadElement.ScreenTipRadElement.AutoNumberKeyTipRadElement.DpiScaleFactorRadElement.LayoutUpdatedRadElement.MouseHoverRadElement.MouseMoveRadElement.MouseDownRadElement.MouseUpRadElement.ClickRadElement.DoubleClickRadElement.MouseEnterRadElement.MouseWheelRadElement.EnabledChangedRadElement.MouseLeaveRadElement.ChildrenChangedRadElement.LostMouseCaptureRadObject.BindingContextPropertyRadObject.RadTypeRadObject.ClearPropertyStore()RadObject.SuspendPropertyNotifications()RadObject.ResumePropertyNotifications()RadObject.GetPropertyValue(RadProperty)RadObject.SetDefaultValueOverride(RadProperty, object)RadObject.SetValue(RadProperty, object)RadObject.ResetValue(RadProperty)RadObject.ResetLocalValue(RadProperty)RadObject.ResetValue(RadProperty, ValueResetFlags)RadObject.UpdateValue(RadProperty)RadObject.GetValueSource(RadProperty)RadObject.GetRegisteredRadProperty(string)RadObject.UpdateValueCore(RadPropertyValue)RadObject.ResetValueCore(RadPropertyValue, ValueResetFlags)RadObject.GetDefaultValue(RadPropertyValue, object)RadObject.CoerceValue(RadPropertyValue, object)RadObject.ShouldSerializeProperty(RadProperty)RadObject.BindProperty(RadProperty, RadObject, RadProperty, PropertyBindingOptions)RadObject.UnbindProperty(RadProperty)RadObject.GetInheritedValue(RadProperty)RadObject.OnNotifyPropertyChanged(string)RadObject.OnNotifyPropertyChanged(PropertyChangedEventArgs)RadObject.OnShouldSerializeProperty(ShouldSerializePropertyEventArgs)RadObject.PropertyValuesRadObject.PropertyFilterRadObject.RadObjectTypeRadObject.BindingContextRadObject.PropertyChangedRadObject.RadPropertyChangedRadObject.RadPropertyChangingDisposableObject.GetBitState(long)DisposableObject.SetBitState(long, bool)DisposableObject.OnBitStateChanged(long, bool, bool)DisposableObject.Dispose()DisposableObject.Dispose(bool)DisposableObject.DisposeUnmanagedResources()DisposableObject.BitStateDisposableObject.EventsDisposableObject.IsDisposingDisposableObject.IsDisposedDisposableObject.DisposedDisposableObject.Disposing

Constructors

RadHostItem(Control)

Initializes a new instance of the RadHostItem class with the specified control to host.

Declaration

cs-api-definition
public RadHostItem(Control c)

Parameters

c

Control

The Control to be hosted within this RadHostItem. This can be any Windows Forms control or custom control.

Remarks

The constructor automatically synchronizes inheritable properties such as ForeColor, BackColor, and Font between the host item and the hosted control.

If the hosted control is a RadControl, special handling is applied to synchronize properties with the root element rather than the control directly.

Event wiring is automatically established to ensure proper integration between the hosted control and the Telerik element hierarchy.

Properties

CausesValidation

Gets or sets the CausesValidation property of the hosted control.

Declaration

cs-api-definition
public bool CausesValidation { get; set; }

Property Value

bool

Remarks

Using this property is equivalent to using HostedControl.CausesValidation

ClipControl

Gets or sets a value that determines whether the hosted control should be clipped when it requires more space than available.

Declaration

cs-api-definition
public virtual bool ClipControl { get; set; }

Property Value

bool

true if the hosted control should be clipped to fit within the available bounds; otherwise, false. The default value is true.

Remarks

When set to true, the hosted control will be automatically resized and clipped if it exceeds the available space allocated to the RadHostItem. This ensures the control does not overlap with other elements in the layout.

When set to false, the hosted control can extend beyond the bounds of the RadHostItem, which may cause visual overlap with adjacent elements.

Enabled

Gets or sets a value indicating whether the RadHostItem and its hosted control are enabled.

Declaration

cs-api-definition
public override bool Enabled { get; set; }

Property Value

bool

true if both the RadHostItem and its hosted control are enabled; otherwise, false.

Overrides RadElement.Enabled

Remarks

When this property is set, the enabled state is automatically synchronized with the hosted control. Setting this to false will also disable the hosted control, preventing user interaction. If the hosted control supports disabled appearance, it will be rendered accordingly.

HostedControl

Gets the instance of the hosted Windows Forms control.

Declaration

cs-api-definition
public Control HostedControl { get; }

Property Value

Control

The Control instance that is being hosted by this RadHostItem.

Remarks

This property provides direct access to the Windows Forms control that is hosted within the RadHostItem. The hosted control maintains its native functionality while being integrated into the Telerik element tree.

The hosted control can be any descendant of the Control class, including standard Windows Forms controls, third-party controls, or custom user controls.

Changes to the hosted control's properties should be made through this property or through the RadHostItem's synchronized properties to ensure proper integration with the TPF framework.

RouteMessages

Gets or sets whether the mouse and keyboard messages from the hosted control can be routed to the owner control.

Declaration

cs-api-definition
public bool RouteMessages { get; set; }

Property Value

bool

Remarks

You can use Control to get the owner control.

To get the hosted control use HostedControl property.

Methods

ArrangeCore(RectangleF)

Arranges the hosted control within the final layout rectangle, handling size synchronization.

Declaration

cs-api-definition
protected override void ArrangeCore(RectangleF finalRect)

Parameters

finalRect

RectangleF

The final area within which this element should arrange its hosted control.

Overrides RadElement.ArrangeCore(RectangleF)

DisposeManagedResources()

Releases managed resources used by this element, including disposing the hosted control.

Declaration

cs-api-definition
protected override void DisposeManagedResources()

Overrides RadItem.DisposeManagedResources()

DpiScaleChanged(SizeF)

Called when the DPI scaling changes, updating the font synchronization for the hosted control.

Declaration

cs-api-definition
public override void DpiScaleChanged(SizeF scaleFactor)

Parameters

scaleFactor

SizeF

The new DPI scale factor.

Overrides RadElement.DpiScaleChanged(SizeF)

EnsureHostedControl()

Ensures the hosted control is properly registered with the component tree handler.

Declaration

cs-api-definition
protected void EnsureHostedControl()

Focus()

Attempts to set focus to the hosted control.

Declaration

cs-api-definition
public override bool Focus()

Returns

bool

true if the hosted control successfully received focus; otherwise, false.

Overrides RadElement.Focus()

Remarks

This method attempts to set focus to the hosted control. If the hosted control implements IComponentTreeHandler, the focus request is routed through the interface. Otherwise, the default focus behavior is applied.

InitializeFields()

Initializes the fields of this instance with their default values.

Declaration

cs-api-definition
protected override void InitializeFields()

Overrides RadItem.InitializeFields()

MeasureOverride(SizeF)

Measures the size required by the hosted control and returns the desired size.

Declaration

cs-api-definition
protected override SizeF MeasureOverride(SizeF availableSize)

Parameters

availableSize

SizeF

The available size that this element can allocate to the hosted control.

Returns

SizeF

The desired size needed by this element based on the hosted control's size requirements.

Overrides RadElement.MeasureOverride(SizeF)

OnElementTreeChanged(ComponentThemableElementTree)

Called when the element tree changes, handling registration and unregistration of the hosted control.

Declaration

cs-api-definition
protected override void OnElementTreeChanged(ComponentThemableElementTree previousTree)

Parameters

previousTree

ComponentThemableElementTree

The previous element tree that this element was part of.

Overrides RadElement.OnElementTreeChanged(ComponentThemableElementTree)

OnGotFocus(EventArgs)

Raises the GotFocus event.

Declaration

cs-api-definition
protected virtual void OnGotFocus(EventArgs e)

Parameters

e

EventArgs

An EventArgs that contains the event data.

OnLoaded()

Called when the element is loaded and ready for display operations.

Declaration

cs-api-definition
protected override void OnLoaded()

Overrides RadElement.OnLoaded()

OnLostFocus(EventArgs)

Raises the LostFocus event.

Declaration

cs-api-definition
protected virtual void OnLostFocus(EventArgs e)

Parameters

e

EventArgs

An EventArgs that contains the event data.

OnPropertyChanged(RadPropertyChangedEventArgs)

Called when a property value has changed, handling synchronization of properties between the RadHostItem and the hosted control.

Declaration

cs-api-definition
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)

Parameters

e

RadPropertyChangedEventArgs

The property changed event arguments.

Overrides RadItem.OnPropertyChanged(RadPropertyChangedEventArgs)

OnTransformationInvalidated()

Called when transformation is invalidated, synchronizing bounds with the hosted control.

Declaration

cs-api-definition
protected override void OnTransformationInvalidated()

Overrides RadElement.OnTransformationInvalidated()

OnTunnelEvent(RadElement, RoutedEventArgs)

Called when a tunnel event is received, handling layout suspension/resumption for the hosted control.

Declaration

cs-api-definition
protected override void OnTunnelEvent(RadElement sender, RoutedEventArgs args)

Parameters

sender

RadElement

The element that raised the event.

args

RoutedEventArgs

The routed event arguments.

Overrides RadElement.OnTunnelEvent(RadElement, RoutedEventArgs)

OnValidated(EventArgs)

Raises the Validated event.

Declaration

cs-api-definition
protected virtual void OnValidated(EventArgs e)

Parameters

e

EventArgs

An EventArgs that contains the event data.

OnValidating(CancelEventArgs)

Raises the Validating event.

Declaration

cs-api-definition
protected virtual void OnValidating(CancelEventArgs e)

Parameters

e

CancelEventArgs

A CancelEventArgs that contains the event data.

SyncBoundsWithHostedControl()

Synchronizes the bounds of the hosted control with the RadHostItem's current position and size.

Declaration

cs-api-definition
protected virtual void SyncBoundsWithHostedControl()

SyncFont(Font)

Synchronizes the font of the hosted control with the RadHostItem's font, applying DPI scaling if necessary.

Declaration

cs-api-definition
protected virtual void SyncFont(Font font)

Parameters

font

Font

The font to synchronize with the hosted control.

UpdateControlVisibility()

Updates the visibility, which is bound to the item's current IsVisible state, of the hosted control.

Declaration

cs-api-definition
public void UpdateControlVisibility()

Events

GotFocus

Occurs when the element receives focus.

Declaration

cs-api-definition
[Browsable(false)]
public event EventHandler GotFocus

Event Value

EventHandler

LostFocus

Occurs when the element loses focus.

Declaration

cs-api-definition
[Browsable(false)]
public event EventHandler LostFocus

Event Value

EventHandler

Validated

Corresponds to the hosted control's Validated event.

Declaration

cs-api-definition
public event EventHandler Validated

Event Value

EventHandler

Validating

Corresponds to the hosted control's Validating event.

Declaration

cs-api-definition
public event CancelEventHandler Validating

Event Value

CancelEventHandler