LayoutControlItem
Represents an item of RadLayoutControl which can have an associated control. Responsible for arranging the associated control within the RadLayoutControl. Can display a text in addition to the control.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class LayoutControlItem : LayoutControlItemBase, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementLayoutControlItemBaseLayoutControlItem...
Derived Classes:
Implements:
Inherited Members
Constructors
public LayoutControlItem()
Properties
Gets or sets the control associated with this item.
public Control AssociatedControl { get; set; }
Gets or sets the associated control's vertical alignment. Until explicitly assigned, auto-sized controls use Center; otherwise, the alignment is Stretch.
[Browsable(true)]
public RadVerticalAlignment ControlVerticalAlignment { get; set; }
Gets or sets the fixed size of the text part which will be used when TextSizeMode is set to fixed.
[Browsable(true)]
public int TextFixedSize { get; set; }
Gets or sets the maximum size of the text part.
[Browsable(true)]
public int TextMaxSize { get; set; }
Gets or sets the minimum size of the text part.
[Browsable(true)]
public int TextMinSize { get; set; }
Gets or sets the position of the text of the item.
[Browsable(true)]
public virtual LayoutItemTextPosition TextPosition { get; set; }
Gets or sets the proportional size of the text part which will be used when TextSizeMode is set to proportional.
[Browsable(true)]
public float TextProportionalSize { get; set; }
Gets or sets the way in which the text part will be sized - proportionally or fixed-size.
[Browsable(true)]
public LayoutItemTextSizeMode TextSizeMode { get; set; }
Methods
Initializes the item as an unfilled, borderless layout slot with text drawing disabled by default.
protected override void CreateChildElements()
Overrides:
Applies ControlVerticalAlignment to the available control rectangle; non-stretch alignments retain the associated control's current height.
Gets the rectangle in which the associated control will be arranged.
protected virtual Rectangle GetControlRectangle(RectangleF clientRect)
The client area of the item.
Returns:The arrange rectangle of the control.
Gets the rectangle in which the text part will be arranged.
protected virtual RectangleF GetTextRectangle(RectangleF clientRect)
The client area of the item.
Returns:The arrange rectangle of the text part.
Measures the item and, when text is enabled, measures its text layout within the text portion of the client area.
Resolves a cached AssociatedControlName to a control in the owning layout control.
protected override void OnLoaded()
Overrides:
Refreshes the parent layout and hosted-control bounds when text-layout settings change, unless the parent layout is suspended.
protected override void OnNotifyPropertyChanged(PropertyChangedEventArgs e)
The property notification.
Overrides:
Synchronizes the associated control's visibility with the item's hidden and visible states.
protected override void OnNotifyPropertyChanged(string propertyName)
The name of the changed property.
Overrides:
Ensures an associated control remains in the owning layout control's control collection after this item is reparented.
protected override void OnParentChanged(RadElement previousParent)
The element that previously contained this item.
Overrides:
Refreshes measurement, layout, and associated-control bounds when text drawing changes.
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
The property change notification.
Overrides:
Replaces the hosted control and synchronizes its visibility. When an existing control is attached to a layout control, removes it from the control collection; adds a replacement that is not already in the collection and updates its bounds. Raises a property notification when the reference changes.
Updates the bounds of the associated control.
public void UpdateControlBounds()