ClassRadToolbarFormControlElement
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
RadToolbarFormControlElement()
Initializes a new instance of the RadToolbarFormControlElement class. Sets up the item collections for near, center, and far positioned toolbar elements.
Declaration
public RadToolbarFormControlElement()
Fields
CaptionHeightProperty
Declaration
public static RadProperty CaptionHeightProperty
Field Value
CenterItemsMarginProperty
Declaration
public static RadProperty CenterItemsMarginProperty
Field Value
FarItemsMarginProperty
Declaration
public static RadProperty FarItemsMarginProperty
Field Value
IsToolbarFormActiveProperty
Declaration
public static RadProperty IsToolbarFormActiveProperty
Field Value
NearItemsMarginProperty
Declaration
public static RadProperty NearItemsMarginProperty
Field Value
ToolbarFormWindowStateProperty
Declaration
public static RadProperty ToolbarFormWindowStateProperty
Field Value
Properties
CaptionBorder
Gets the BorderPrimitiveinstance that represents the border of the toolbar control's caption.
Declaration
[Browsable(false)]
public BorderPrimitive CaptionBorder { get; }
Property Value
CaptionFill
Gets the FillPrimitiveinstance that represents the fill of the toolbar control's caption.
Declaration
[Browsable(false)]
public FillPrimitive CaptionFill { get; }
Property Value
CaptionHeight
Gets or sets the height of the extended title bar.
Declaration
[Browsable(true)]
public int CaptionHeight { get; set; }
Property Value
CaptionTextElement
Gets the text element.
Declaration
public LightVisualElement CaptionTextElement { get; }
Property Value
CenterItems
Gets a collection of the items positioned in the center of the toolbar form control.
Declaration
[Browsable(true)]
[RadEditItemsAction]
public RadItemOwnerCollection CenterItems { get; }
Property Value
CenterItemsContainer
Gets the center items container.
Declaration
public WrapLayoutPanel CenterItemsContainer { get; }
Property Value
CenterItemsMargin
Gets or sets the margin that defines the margin of the WrapLayoutPanel holding the center items.
CenterItemsVerticalAlignment
Gets or sets the vertical alignment of the center toolbar items.
Declaration
[Browsable(true)]
public RadVerticalAlignment CenterItemsVerticalAlignment { get; set; }
Property Value
CenterItemsWrapWeight
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.
Declaration
[Browsable(true)]
public int? CenterItemsWrapWeight { get; set; }
Property Value
int?
CloseButton
Gets the Close button
Declaration
public RadButtonElement CloseButton { get; }
Property Value
FarItems
Gets a collection of the items positioned on the far side (typically right) of the toolbar form control.
Declaration
[Browsable(true)]
[RadEditItemsAction]
public RadItemOwnerCollection FarItems { get; }
Property Value
FarItemsContainer
Gets the far items container.
Declaration
public WrapLayoutPanel FarItemsContainer { get; }
Property Value
FarItemsMargin
Gets or sets the margin that defines the margin of the WrapLayoutPanel holding the far items.
FarItemsVerticalAlignment
Gets or sets the vertical alignment of the far toolbar items.
Declaration
[Browsable(true)]
public RadVerticalAlignment FarItemsVerticalAlignment { get; set; }
Property Value
FarItemsWrapWeight
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.
Declaration
[Browsable(true)]
public int? FarItemsWrapWeight { get; set; }
Property Value
int?
HelpButton
Gets the Help button.
Declaration
public RadButtonElement HelpButton { get; }
Property Value
IconElement
Gets the icon element.
Declaration
public ImagePrimitive IconElement { get; }
Property Value
MaximizeButton
Gets the Maximize button
Declaration
public RadButtonElement MaximizeButton { get; }
Property Value
MinimizeButton
Gets the Minimize button
Declaration
public RadButtonElement MinimizeButton { get; }
Property Value
NearItems
Gets a collection of the items close to the start of the form.
Declaration
[Browsable(true)]
[RadEditItemsAction]
public RadItemOwnerCollection NearItems { get; }
Property Value
NearItemsContainer
Gets the near items container.
Declaration
public WrapLayoutPanel NearItemsContainer { get; }
Property Value
NearItemsMargin
Gets or sets the margin that defines the margin of the WrapLayoutPanel holding the near items.
NearItemsVerticalAlignment
Gets or sets the vertical alignment of the near toolbar items.
Declaration
[Browsable(true)]
public RadVerticalAlignment NearItemsVerticalAlignment { get; set; }
Property Value
NearItemsWrapWeight
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.
Declaration
[Browsable(true)]
public int? NearItemsWrapWeight { get; set; }
Property Value
int?
ShowIcon
Gets or sets a value indicating whether an icon is displayed in the caption bar of the form.
ShowText
Gets or sets whether the element holding the text is visible.
SystemButtons
Gets the container element that holds the system buttons (minimize, maximize, close).
Declaration
public StackLayoutElement SystemButtons { get; }
Property Value
The StackLayoutElement containing the system buttons.
TextPosition
Gets or sets the position of the text inside the title bar.
Declaration
[Browsable(true)]
public ToolbarTextPosition TextPosition { get; set; }
Property Value
WrapMode
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.
Declaration
[Browsable(true)]
public ToolbarWrapMode WrapMode { get; set; }
Property Value
Methods
ArrangeOverride(SizeF)
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.
CreateBorderElement()
Creates a new BorderPrimitive for the caption border.
Declaration
protected virtual BorderPrimitive CreateBorderElement()
Returns
A new instance of BorderPrimitive.
CreateChildElements()
Creates and initializes all child elements including item containers, icon, text, caption elements, and system buttons.
Declaration
protected override void CreateChildElements()
Overrides
CreateElementsContainer()
Creates a new WrapLayoutPanel container for toolbar elements.
Declaration
protected virtual WrapLayoutPanel CreateElementsContainer()
Returns
A new instance of WrapLayoutPanel.
CreateFillElement()
Creates a new FillPrimitive for the caption background.
Declaration
protected virtual FillPrimitive CreateFillElement()
Returns
A new instance of FillPrimitive.
CreateIconElement()
Creates a new ImagePrimitive element for displaying the form icon.
Declaration
protected virtual ImagePrimitive CreateIconElement()
Returns
A new instance of ImagePrimitive.
CreateTextElement()
Creates a new LightVisualElement for displaying the caption text.
Declaration
protected virtual LightVisualElement CreateTextElement()
Returns
A new instance of LightVisualElement.
InitializeFields()
Initializes the default values for field properties.
Declaration
protected override void InitializeFields()
Overrides
MeasureOverride(SizeF)
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.
OnClose(object, EventArgs)
Handles the close button click event, closing the parent form.
OnDoubleClick(EventArgs)
Handles the double-click event, triggering the maximize/restore functionality if the maximize button is visible.
OnHelpButtonClick(object, EventArgs)
Handles the help button click event, sending a context help system command to the parent form.
OnMaximizeRestore(object, EventArgs)
Handles the maximize/restore button click event, toggling the parent form between maximized and normal window states.
OnMinimize(object, EventArgs)
Handles the minimize button click event, minimizing the parent form.
OnMouseDown(MouseEventArgs)
Handles the mouse down event, storing the initial mouse position for potential drag operations.
Declaration
protected override void OnMouseDown(MouseEventArgs e)
Parameters
e
The MouseEventArgs containing the event data.
Overrides
OnMouseMove(MouseEventArgs)
Handles the mouse move event, enabling form dragging when the mouse is moved while pressed.
Declaration
protected override void OnMouseMove(MouseEventArgs e)
Parameters
e
The MouseEventArgs containing the event data.
Overrides
ShouldArrangeChild(RadElement)
Determines whether the specified child element should be arranged during the layout process.
Declaration
protected override bool ShouldArrangeChild(RadElement child)
Parameters
child
The child element to evaluate.
Returns
true if the child should be arranged; otherwise, false.
Overrides
ShouldMeasureChild(RadElement)
Determines whether the specified child element should be measured during the layout process.
Declaration
protected override bool ShouldMeasureChild(RadElement child)
Parameters
child
The child element to evaluate.
Returns
true if the child should be measured; otherwise, false.
Overrides