Class RadToolbarFormControlElement
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
public class RadToolbarFormControlElement : LightVisualElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IComponent, IDisposable, IBindableComponent, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
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
CenterItemsMarginProperty
FarItemsMarginProperty
IsToolbarFormActiveProperty
NearItemsMarginProperty
ToolbarFormWindowStateProperty
Properties
CaptionBorder
Gets the BorderPrimitiveinstance that represents the border of the toolbar control's caption.
Declaration
public BorderPrimitive CaptionBorder { get; }
Property Value
BorderPrimitive
|
CaptionFill
Gets the FillPrimitiveinstance that represents the fill of the toolbar control's caption.
Declaration
public FillPrimitive CaptionFill { get; }
Property Value
FillPrimitive
|
CaptionHeight
Gets or sets the height of the extended title bar.
Declaration
public int CaptionHeight { get; set; }
Property Value
System.Int32
|
CaptionTextElement
Gets the text element.
Declaration
public LightVisualElement CaptionTextElement { get; }
Property Value
LightVisualElement
|
CenterItems
Gets a collection of the items positioned in the center of the toolbar form control.
Declaration
[RadEditItemsAction]
public RadItemOwnerCollection CenterItems { get; }
Property Value
RadItemOwnerCollection
|
CenterItemsContainer
Gets the center items container.
Declaration
public WrapLayoutPanel CenterItemsContainer { get; }
Property Value
WrapLayoutPanel
|
CenterItemsMargin
Gets or sets the margin that defines the margin of the WrapLayoutPanel holding the center items.
Declaration
public Padding CenterItemsMargin { get; set; }
Property Value
System.Windows.Forms.Padding
|
CenterItemsVerticalAlignment
Gets or sets the vertical alignment of the center toolbar items.
Declaration
public RadVerticalAlignment CenterItemsVerticalAlignment { get; set; }
Property Value
RadVerticalAlignment
|
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
public int? CenterItemsWrapWeight { get; set; }
Property Value
System.Nullable<System.Int32>
|
CloseButton
Gets the Close button
Declaration
public RadButtonElement CloseButton { get; }
Property Value
RadButtonElement
|
FarItems
Gets a collection of the items positioned on the far side (typically right) of the toolbar form control.
Declaration
[RadEditItemsAction]
public RadItemOwnerCollection FarItems { get; }
Property Value
RadItemOwnerCollection
|
FarItemsContainer
Gets the far items container.
Declaration
public WrapLayoutPanel FarItemsContainer { get; }
Property Value
WrapLayoutPanel
|
FarItemsMargin
Gets or sets the margin that defines the margin of the WrapLayoutPanel holding the far items.
Declaration
public Padding FarItemsMargin { get; set; }
Property Value
System.Windows.Forms.Padding
|
FarItemsVerticalAlignment
Gets or sets the vertical alignment of the far toolbar items.
Declaration
public RadVerticalAlignment FarItemsVerticalAlignment { get; set; }
Property Value
RadVerticalAlignment
|
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
public int? FarItemsWrapWeight { get; set; }
Property Value
System.Nullable<System.Int32>
|
HelpButton
Gets the Help button.
Declaration
public RadButtonElement HelpButton { get; }
Property Value
RadButtonElement
|
IconElement
Gets the icon element.
Declaration
public ImagePrimitive IconElement { get; }
Property Value
ImagePrimitive
|
MaximizeButton
Gets the Maximize button
Declaration
public RadButtonElement MaximizeButton { get; }
Property Value
RadButtonElement
|
MinimizeButton
Gets the Minimize button
Declaration
public RadButtonElement MinimizeButton { get; }
Property Value
RadButtonElement
|
NearItems
Gets a collection of the items close to the start of the form.
Declaration
[RadEditItemsAction]
public RadItemOwnerCollection NearItems { get; }
Property Value
RadItemOwnerCollection
|
NearItemsContainer
Gets the near items container.
Declaration
public WrapLayoutPanel NearItemsContainer { get; }
Property Value
WrapLayoutPanel
|
NearItemsMargin
Gets or sets the margin that defines the margin of the WrapLayoutPanel holding the near items.
Declaration
public Padding NearItemsMargin { get; set; }
Property Value
System.Windows.Forms.Padding
|
NearItemsVerticalAlignment
Gets or sets the vertical alignment of the near toolbar items.
Declaration
public RadVerticalAlignment NearItemsVerticalAlignment { get; set; }
Property Value
RadVerticalAlignment
|
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
public int? NearItemsWrapWeight { get; set; }
Property Value
System.Nullable<System.Int32>
|
ShowIcon
Gets or sets a value indicating whether an icon is displayed in the caption bar of the form.
Declaration
public virtual bool ShowIcon { get; set; }
Property Value
System.Boolean
|
ShowText
Gets or sets whether the element holding the text is visible.
Declaration
public virtual bool ShowText { get; set; }
Property Value
System.Boolean
|
SystemButtons
Gets the container element that holds the system buttons (minimize, maximize, close).
Declaration
public StackLayoutElement SystemButtons { get; }
Property Value
StackLayoutElement
The StackLayoutElement containing the system buttons. |
TextPosition
Gets or sets the position of the text inside the title bar.
Declaration
public ToolbarTextPosition TextPosition { get; set; }
Property Value
ToolbarTextPosition
|
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
public ToolbarWrapMode WrapMode { get; set; }
Property Value
ToolbarWrapMode
|
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.
Declaration
protected override SizeF ArrangeOverride(SizeF finalSize)
Parameters
System.Drawing.SizeF
finalSize
The final area within which the element should arrange itself and its children. |
Returns
System.Drawing.SizeF
The actual size used by the element. |
Overrides
CreateBorderElement()
Creates a new BorderPrimitive for the caption border.
Declaration
protected virtual BorderPrimitive CreateBorderElement()
Returns
BorderPrimitive
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
WrapLayoutPanel
A new instance of WrapLayoutPanel. |
CreateFillElement()
Creates a new FillPrimitive for the caption background.
Declaration
protected virtual FillPrimitive CreateFillElement()
Returns
FillPrimitive
A new instance of FillPrimitive. |
CreateIconElement()
Creates a new ImagePrimitive element for displaying the form icon.
Declaration
protected virtual ImagePrimitive CreateIconElement()
Returns
ImagePrimitive
A new instance of ImagePrimitive. |
CreateTextElement()
Creates a new LightVisualElement for displaying the caption text.
Declaration
protected virtual LightVisualElement CreateTextElement()
Returns
LightVisualElement
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.
Declaration
protected override SizeF MeasureOverride(SizeF availableSize)
Parameters
System.Drawing.SizeF
availableSize
The available size that the element can occupy. |
Returns
System.Drawing.SizeF
The desired size of the element. |
Overrides
OnClose(Object, EventArgs)
Handles the close button click event, closing the parent form.
Declaration
protected void OnClose(object sender, EventArgs args)
Parameters
System.Object
sender
The source of the event. |
System.EventArgs
args
The System.EventArgs containing the event data. |
OnDoubleClick(EventArgs)
Handles the double-click event, triggering the maximize/restore functionality if the maximize button is visible.
Declaration
protected override void OnDoubleClick(EventArgs e)
Parameters
System.EventArgs
e
The System.EventArgs containing the event data. |
Overrides
OnHelpButtonClick(Object, EventArgs)
Handles the help button click event, sending a context help system command to the parent form.
Declaration
protected void OnHelpButtonClick(object sender, EventArgs e)
Parameters
System.Object
sender
The source of the event. |
System.EventArgs
e
The System.EventArgs containing the event data. |
OnMaximizeRestore(Object, EventArgs)
Handles the maximize/restore button click event, toggling the parent form between maximized and normal window states.
Declaration
protected void OnMaximizeRestore(object sender, EventArgs args)
Parameters
System.Object
sender
The source of the event. |
System.EventArgs
args
The System.EventArgs containing the event data. |
OnMinimize(Object, EventArgs)
Handles the minimize button click event, minimizing the parent form.
Declaration
protected void OnMinimize(object sender, EventArgs args)
Parameters
System.Object
sender
The source of the event. |
System.EventArgs
args
The System.EventArgs containing the event data. |
OnMouseDown(MouseEventArgs)
Handles the mouse down event, storing the initial mouse position for potential drag operations.
Declaration
protected override void OnMouseDown(MouseEventArgs e)
Parameters
System.Windows.Forms.MouseEventArgs
e
The System.Windows.Forms.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
System.Windows.Forms.MouseEventArgs
e
The System.Windows.Forms.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
RadElement
child
The child element to evaluate. |
Returns
System.Boolean
|
Overrides
ShouldMeasureChild(RadElement)
Determines whether the specified child element should be measured during the layout process.
Declaration
protected override bool ShouldMeasureChild(RadElement child)
Parameters
RadElement
child
The child element to evaluate. |
Returns
System.Boolean
|