Class ToolStripEx
Inheritance
System.Object
ToolStripEx
Assembly: Syncfusion.Tools.Windows.dll
public class ToolStripEx : ToolStrip, IThemeProvider, IVisualStyle, IToolStripExSupport2, IToolStripExSupport, INativeMessageFilter
Constructors
Declaration
Declaration
public ToolStripEx(ToolStripRenderer renderer)
Parameters
Type |
Name |
Description |
System.Windows.Forms.ToolStripRenderer |
renderer |
|
Fields
Declaration
protected const int DEF_IMAGE_BORDER_OFFSET = 5
Field Value
Height of space between image and text and between text and down arrow in collapsed state dropdown button.
Declaration
protected const int DEF_PIXELS_BETWEEN_ELEMENTS_COLLAPSED = 2
Field Value
Properties
Gets or sets the value indicating whether to apply text alignment for the ToolStripMenuItems in the ToolStripEx.
Declaration
public bool AllowMenuTextAlignment { get; set; }
Property Value
Gets or sets the border style for the control.
Declaration
public virtual ToolStripBorderStyle BorderStyle { get; set; }
Property Value
Gets the width of border.
Declaration
protected int BorderWidth { get; }
Property Value
Gets or sets a value indicating whether a SkinManager theme style has been applied to the control.
Declaration
public bool CanApplyTheme { get; set; }
Property Value
Type |
Description |
System.Boolean |
The default value is true.
|
Gets or sets a value indicating whether control elements styles can be overridden by theme style settings.
Declaration
public bool CanOverrideStyle { get; set; }
Property Value
Type |
Description |
System.Boolean |
Default value is false.
|
Gets or sets the alignment of caption.
Declaration
public virtual CaptionAlignment CaptionAlignment { get; set; }
Property Value
Gets or sets the caption font.
Declaration
public virtual Font CaptionFont { get; set; }
Property Value
Gets the height of caption.
Declaration
public virtual int CaptionHeight { get; }
Property Value
Gets or sets the minimum height of the caption.
Declaration
public virtual int CaptionMinHeight { get; set; }
Property Value
Gets or sets whether the caption should be aligned to top or bottom.
Declaration
public virtual CaptionStyle CaptionStyle { get; set; }
Property Value
CaptionTextStyle
Gets or sets whether the caption text should be drawn etched, plain or with shadow.
Declaration
public virtual CaptionTextStyle CaptionTextStyle { get; set; }
Property Value
Gets or sets whether the ToolStripEx honors item clicks when its containing form does
not have input focus
Declaration
public bool ClickThrough { get; set; }
Property Value
Type |
Description |
System.Boolean |
Returns false value
|
Gets or sets the image of collapsed state dropdown button.
Declaration
[Obsolete("Use Image instead.")]
public Image CollapsedDropDownButtonImage { get; set; }
Property Value
Type |
System.Drawing.Image |
CollapsedDropDownButtonText
Gets or sets the text of collapsed state dropdown button.
Declaration
public string CollapsedDropDownButtonText { get; set; }
Property Value
Width of toolstrip in collapsed state.
Declaration
public int CollapsedWidth { get; }
Property Value
Declaration
protected override Padding DefaultMargin { get; }
Property Value
Type |
System.Windows.Forms.Padding |
Size of toolstrip in expanded state.
Declaration
public Size ExpandedSize { get; }
Property Value
Gets or sets control fore color.
Declaration
public virtual Color ForeColor { get; set; }
Property Value
Type |
System.Drawing.Color |
Gets or Sets whether the buttons should be grouped.
Declaration
public virtual bool GroupedButtons { get; set; }
Property Value
Gets or sets the image of ToolStripEx (shown in quick items panel).
Declaration
public Image Image { get; set; }
Property Value
Type |
System.Drawing.Image |
Gets a value indicating whether the visual style based theme is applied to the control.
This also indicates whether the theme files are referred from external assemblies or not.
Declaration
public bool IsVisualStyleEnabled { get; }
Property Value
Type |
Description |
System.Boolean |
Return true, if the visual style based theme is applied to control. Otherwise returns false.
|
Gets a value indicating whether the launcher is selected.
Declaration
public virtual bool LauncherSelected { get; }
Property Value
Gets or sets whether the launcher style should be Office12 or Office2007.
Declaration
public virtual LauncherStyle LauncherStyle { get; set; }
Property Value
Gets a cached instance of the control's layout engine. (overridden property)
Declaration
public override LayoutEngine LayoutEngine { get; }
Property Value
Type |
System.Windows.Forms.Layout.LayoutEngine |
Gets or sets a value indicating whether Office12 mode should be turned on.
Declaration
public virtual bool Office12Mode { get; set; }
Property Value
Type |
Description |
System.Boolean |
true if [office12 mode]; otherwise, false .
|
Gets or sets whether the Office color scheme should be Silver or Blue.
Declaration
public virtual ToolStripEx.ColorScheme OfficeColorScheme { get; set; }
Property Value
Gets or Sets whether the caption should be shown or not.
Declaration
public virtual bool ShowCaption { get; set; }
Property Value
Type |
Description |
System.Boolean |
true, if caption should be shown, false otherwise
|
Gets or sets a value indicating whether ToolTips are to be displayed on the Toolstrip
items.
Declaration
public bool ShowItemToolTips { get; set; }
Property Value
Gets or Sets whether the Launcher should be shown or not.
Declaration
public virtual bool ShowLauncher { get; set; }
Property Value
Type |
Description |
System.Boolean |
true, if Launcher should be shown, false otherwise
|
Gets or sets state of ToolStripEx.
Declaration
public ToolStripEx.ToolStripExState State { get; set; }
Property Value
Gets or sets corresponding ToolStripTabItem.
Declaration
public ToolStripTabItem TabItem { get; set; }
Property Value
Gets or sets the theme name of the ToolStripEx control.
Declaration
public string ThemeName { get; set; }
Property Value
Declaration
public ToolStripExStyleInfo ThemeStyle { get; set; }
Property Value
Gets or sets an advanced appearance for the ToolStripEx.
Declaration
public ToolStripExStyle VisualStyle { get; set; }
Property Value
Methods
Declaration
public static bool BoolExToBool(BoolEx boolEx)
Parameters
Type |
Name |
Description |
BoolEx |
boolEx |
Input BoolEx.
|
Returns
Type |
Description |
System.Boolean |
Output bool.
|
Declaration
public static BoolEx BoolToBoolEx(bool bBool)
Parameters
Type |
Name |
Description |
System.Boolean |
bBool |
Input bool.
|
Returns
Type |
Description |
BoolEx |
Output BoolEx.
|
Declaration
protected override void Dispose(bool disposing)
Parameters
Type |
Name |
Description |
System.Boolean |
disposing |
|
Declaration
public string GetActiveThemeName()
Returns
Type |
Description |
System.String |
Returns the active theme name.
|
Returns collection of toolstrip items. Pays caution to the state of toolstrip.
Declaration
public ToolStripItemCollection GetItems()
Returns
Type |
Description |
System.Windows.Forms.ToolStripItemCollection |
Collection of toolstrip items.
|
Retrieves the size of a rectangular area into which a control can be fitted.
Declaration
public override Size GetPreferredSize(Size szProposed)
Parameters
Type |
Name |
Description |
System.Drawing.Size |
szProposed |
The custom-sized area for a control.
|
Returns
Type |
Description |
System.Drawing.Size |
An ordered pair of type System.Drawing.Size representing the width and height
of a rectangle.
|
Declaration
protected override void OnFontChanged(EventArgs e)
Parameters
Type |
Name |
Description |
System.EventArgs |
e |
|
Raises the ForeChanged event.
Declaration
protected override void OnForeColorChanged(EventArgs e)
Parameters
Type |
Name |
Description |
System.EventArgs |
e |
|
Declaration
protected override void OnHandleDestroyed(EventArgs e)
Parameters
Type |
Name |
Description |
System.EventArgs |
e |
|
Declaration
protected override void OnItemAdded(ToolStripItemEventArgs e)
Parameters
Type |
Name |
Description |
System.Windows.Forms.ToolStripItemEventArgs |
e |
|
Declaration
protected override void OnItemRemoved(ToolStripItemEventArgs e)
Parameters
Type |
Name |
Description |
System.Windows.Forms.ToolStripItemEventArgs |
e |
Provides data for
|
Declaration
protected virtual void OnLauncherClick()
Declaration
protected override void OnLayoutCompleted(EventArgs e)
Parameters
Type |
Name |
Description |
System.EventArgs |
e |
|
Declaration
protected override void OnMouseClick(MouseEventArgs e)
Parameters
Type |
Name |
Description |
System.Windows.Forms.MouseEventArgs |
e |
|
Declaration
protected override void OnMouseLeave(EventArgs e)
Parameters
Type |
Name |
Description |
System.EventArgs |
e |
|
Declaration
protected override void OnMouseMove(MouseEventArgs e)
Parameters
Type |
Name |
Description |
System.Windows.Forms.MouseEventArgs |
e |
|
Declaration
protected override void OnPaddingChanged(EventArgs e)
Parameters
Type |
Name |
Description |
System.EventArgs |
e |
|
Declaration
protected override void OnPaint(PaintEventArgs e)
Parameters
Type |
Name |
Description |
System.Windows.Forms.PaintEventArgs |
e |
|
Raises the ParentChanged event.
Declaration
protected override void OnParentChanged(EventArgs e)
Parameters
Type |
Name |
Description |
System.EventArgs |
e |
|
Declaration
protected override void OnRendererChanged(EventArgs e)
Parameters
Type |
Name |
Description |
System.EventArgs |
e |
|
Declaration
protected override void OnSizeChanged(EventArgs e)
Parameters
Type |
Name |
Description |
System.EventArgs |
e |
|
Declaration
protected virtual bool OnStateChanging()
Returns
Type |
Description |
System.Boolean |
Returns true to allow changing of State property
|
OnTextChanged(EventArgs)
Declaration
protected override void OnTextChanged(EventArgs e)
Parameters
Type |
Name |
Description |
System.EventArgs |
e |
|
Raises the Visible Changed event when visibility of ToolStripEx is changed
Declaration
protected override void OnVisibleChanged(EventArgs e)
Parameters
Type |
Name |
Description |
System.EventArgs |
e |
|
Imitates launcher clicking.
Declaration
public void PerformLauncherClick()
Occurs when the ToolStrip State is Changing.
Declaration
public override void ResetFont()
Declaration
protected override void WndProc(ref Message m)
Parameters
Type |
Name |
Description |
System.Windows.Forms.Message |
m |
|
Events
Declaration
public event ToolStripDropDownClosingEventHandler CollapsedDropdownClosing
Event Type
Type |
System.Windows.Forms.ToolStripDropDownClosingEventHandler |
Occurs when the image is changed
Declaration
public event EventHandler ImageChanged
Event Type
Declaration
public event EventHandler LauncherClick
Event Type
Declaration
public event ToolStripEx.LauncherEnter LauncherMouseEnter
Event Type
Declaration
public event ToolStripEx.LauncherLeave LauncherMouseLeave
Event Type
Declaration
public event CancelEventHandler StateChanging
Event Type
Type |
System.ComponentModel.CancelEventHandler |
Declaration
public event ThemeChangedEventHandler ThemeNameChanged
Event Type
Explicit Interface Implementations
Gets or sets the VisualTheme of the ToolStripEx control.
Declaration
string IVisualStyle.VisualTheme { get; set; }
Returns
Declaration
bool INativeMessageFilter.ProcessMessage(ref Message m)
Parameters
Type |
Name |
Description |
System.Windows.Forms.Message |
m |
|
Returns
Gets or sets the BaseTheme name of the theme
Declaration
string IThemeProvider.BaseThemeName { get; set; }
Returns
Gets the name of the control.
Declaration
string IThemeProvider.ControlName { get; }
Returns
Implements