Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class RadToolbarFormControlElement : LightVisualElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementRadToolbarFormControlElement...
Implements:
Inherited Members
Constructors
Initializes a new instance of the RadToolbarFormControlElement class. Sets up the item collections for near, center, and far positioned toolbar elements.
public RadToolbarFormControlElement()
Fields
public static RadProperty CaptionHeightProperty
public static RadProperty CenterItemsMarginProperty
public static RadProperty FarItemsMarginProperty
public static RadProperty IsToolbarFormActiveProperty
public static RadProperty NearItemsMarginProperty
public static RadProperty ToolbarFormWindowStateProperty
Properties
Gets the BorderPrimitiveinstance that represents the border of the toolbar control's caption.
[Browsable(false)]
public BorderPrimitive CaptionBorder { get; }
Gets the FillPrimitiveinstance that represents the fill of the toolbar control's caption.
[Browsable(false)]
public FillPrimitive CaptionFill { get; }
Gets or sets the height of the extended title bar.
[Browsable(true)]
public int CaptionHeight { get; set; }
Gets the text element.
public LightVisualElement CaptionTextElement { get; }
Gets a collection of the items positioned in the center of the toolbar form control.
[Browsable(true)]
[RadEditItemsAction]
public RadItemOwnerCollection CenterItems { get; }
Gets the center items container.
public WrapLayoutPanel CenterItemsContainer { get; }
Gets or sets the margin that defines the margin of the WrapLayoutPanel holding the center items.
public Padding CenterItemsMargin { get; set; }
Gets or sets the vertical alignment of the center toolbar items.
[Browsable(true)]
public RadVerticalAlignment CenterItemsVerticalAlignment { get; set; }
Gets or sets the wrap weight while performing the layout of the CenterItems container. The property is only relevant in the Weight wrap mode. The value is in percentage and determines what part of the available space is dedicated to the container.
[Browsable(true)]
public int? CenterItemsWrapWeight { get; set; }
Gets the Close button
public RadButtonElement CloseButton { get; }
Gets a collection of the items positioned on the far side (typically right) of the toolbar form control.
[Browsable(true)]
[RadEditItemsAction]
public RadItemOwnerCollection FarItems { get; }
Gets the far items container.
public WrapLayoutPanel FarItemsContainer { get; }
Gets or sets the margin that defines the margin of the WrapLayoutPanel holding the far items.
public Padding FarItemsMargin { get; set; }
Gets or sets the vertical alignment of the far toolbar items.
[Browsable(true)]
public RadVerticalAlignment FarItemsVerticalAlignment { get; set; }
Gets or sets the wrap weight while performing the layout of the FarItems container. The property is only relevant in the Weight wrap mode. The value is in percentage and determines what part of the available space is dedicated to the container.
[Browsable(true)]
public int? FarItemsWrapWeight { get; set; }
Gets the Help button.
public RadButtonElement HelpButton { get; }
Gets the icon element.
public ImagePrimitive IconElement { get; }
Gets the Maximize button
public RadButtonElement MaximizeButton { get; }
Gets the Minimize button
public RadButtonElement MinimizeButton { get; }
Gets a collection of the items close to the start of the form.
[Browsable(true)]
[RadEditItemsAction]
public RadItemOwnerCollection NearItems { get; }
Gets the near items container.
public WrapLayoutPanel NearItemsContainer { get; }
Gets or sets the margin that defines the margin of the WrapLayoutPanel holding the near items.
public Padding NearItemsMargin { get; set; }
Gets or sets the vertical alignment of the near toolbar items.
[Browsable(true)]
public RadVerticalAlignment NearItemsVerticalAlignment { get; set; }
Gets or sets the wrap weight while performing the layout of the NearItems container. The property is only relevant in the Weight wrap mode. The value is in percentage and determines what part of the available space is dedicated to the container.
[Browsable(true)]
public int? NearItemsWrapWeight { get; set; }
Gets or sets a value indicating whether an icon is displayed in the caption bar of the form.
public virtual bool ShowIcon { get; set; }
Gets or sets whether the element holding the text is visible.
public virtual bool ShowText { get; set; }
Gets the container element that holds the system buttons (minimize, maximize, close).
public StackLayoutElement SystemButtons { get; }
The StackLayoutElement containing the system buttons.
Gets or sets the position of the text inside the title bar.
[Browsable(true)]
public ToolbarTextPosition TextPosition { get; set; }
Determines how the element containers are wrapped in relation to the available space. Both options will allocate the space for each of the containers proportionally from the totally available space. The DesiredSize will calculate the proportion depending on the DesiredSize of the element containers. The Weight option will calculate the proportion depending on the items count or the explicitly specified items weight.
[Browsable(true)]
public ToolbarWrapMode WrapMode { get; set; }
Methods
Arranges the element and its children within the specified bounds. Positions the icon, text, toolbar item containers, and system buttons according to their alignment and positioning settings.
Creates a new BorderPrimitive for the caption border.
protected virtual BorderPrimitive CreateBorderElement()
A new instance of BorderPrimitive.
Creates and initializes all child elements including item containers, icon, text, caption elements, and system buttons.
protected override void CreateChildElements()
Overrides:
Creates a new WrapLayoutPanel container for toolbar elements.
protected virtual WrapLayoutPanel CreateElementsContainer()
A new instance of WrapLayoutPanel.
Creates a new FillPrimitive for the caption background.
Creates a new ImagePrimitive element for displaying the form icon.
Creates a new LightVisualElement for displaying the caption text.
protected virtual LightVisualElement CreateTextElement()
A new instance of LightVisualElement.
Initializes the default values for field properties.
protected override void InitializeFields()
Overrides:
Measures the element and its children to determine the desired size during the layout process. Calculates the layout for toolbar items, icon, text, and system buttons based on the current wrap mode.
Handles the mouse down event, storing the initial mouse position for potential drag operations.
protected override void OnMouseDown(MouseEventArgs e)
The MouseEventArgs containing the event data.
Overrides:
Handles the mouse move event, enabling form dragging when the mouse is moved while pressed.
protected override void OnMouseMove(MouseEventArgs e)
The MouseEventArgs containing the event data.
Overrides:
Determines whether the specified child element should be arranged during the layout process.
protected override bool ShouldArrangeChild(RadElement child)
The child element to evaluate.
Returns:true if the child should be arranged; otherwise, false.
Overrides:
Determines whether the specified child element should be measured during the layout process.
protected override bool ShouldMeasureChild(RadElement child)
The child element to evaluate.
Returns:true if the child should be measured; otherwise, false.
Overrides: