WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class MetroForm

    Show / Hide Table of Contents

    Class MetroForm

    Inheritance
    System.Object
    MetroForm
    MetroTop10AutoFilter
    Office2013StyleMessageBoxAdv
    Office2016StyleMessageBoxAdv
    PivotCompInfo
    MetroAppointmentForm
    CustomCollectionEditorForm
    RadialMenuCustomCollectionEditorForm
    VisualStyleMessageBoxAdv
    Namespace: Syncfusion.Windows.Forms
    Assembly: Syncfusion.Shared.Base.dll
    Syntax
    public class MetroForm : Form

    Constructors

    MetroForm()

    Declaration
    public MetroForm()

    Properties

    AllowRoundedCorners

    Gets or sets a value indicating whether the rounded corners are enabled.

    Declaration
    public bool AllowRoundedCorners { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is false.

    Remarks

    This option is only in effect with Windows 11.

    AutoScroll

    Declaration
    public override bool AutoScroll { get; set; }
    Property Value
    Type Description
    System.Boolean

    BackColor

    Declaration
    public override Color BackColor { get; set; }
    Property Value
    Type Description
    System.Drawing.Color

    BorderColor

    Gets or Sets the value for CaptionBarColor BorderColor

    Declaration
    public Color BorderColor { get; set; }
    Property Value
    Type Description
    System.Drawing.Color

    BorderThickness

    Gets or Set the valur for BorderThickness

    Declaration
    public int BorderThickness { get; set; }
    Property Value
    Type Description
    System.Int32

    CaptionAlign

    Gets or sets the alignment of of the form's title.

    Declaration
    public HorizontalAlignment CaptionAlign { get; set; }
    Property Value
    Type Description
    System.Windows.Forms.HorizontalAlignment

    CaptionBarBrush

    Declaration
    public Brush CaptionBarBrush { get; set; }
    Property Value
    Type Description
    System.Drawing.Brush

    CaptionBarColor

    Gets or Sets the value for CaptionBarColor

    Declaration
    public Color CaptionBarColor { get; set; }
    Property Value
    Type Description
    System.Drawing.Color

    CaptionBarHeight

    Gets or Sets value for CaptionBarHeight

    Declaration
    public int CaptionBarHeight { get; set; }
    Property Value
    Type Description
    System.Int32

    CaptionBarHeightMode

    Gets or sets the value indicating whether the caption bar of the form should retain its default height when form is maximized or not.

    Declaration
    public CaptionBarHeightMode CaptionBarHeightMode { get; set; }
    Property Value
    Type Description
    CaptionBarHeightMode

    CaptionButtonColor

    Gets/Sets the value for CaptionButtonColor

    Declaration
    public Color CaptionButtonColor { get; set; }
    Property Value
    Type Description
    System.Drawing.Color

    CaptionButtonHoverColor

    Gets/Sets the value for CaptionButtonHoverColor

    Declaration
    public Color CaptionButtonHoverColor { get; set; }
    Property Value
    Type Description
    System.Drawing.Color

    CaptionFont

    Gets or sets the font of the form's title.

    Declaration
    public Font CaptionFont { get; set; }
    Property Value
    Type Description
    System.Drawing.Font

    CaptionForeColor

    Gets or sets the color for caption in titlebar

    Declaration
    public Color CaptionForeColor { get; set; }
    Property Value
    Type Description
    System.Drawing.Color

    CaptionImages

    Gets/Sets the CaptionImage for form caption

    Declaration
    public CaptionImageCollection CaptionImages { get; }
    Property Value
    Type Description
    CaptionImageCollection

    CaptionLabels

    Gets/Sets the label for form caption

    Declaration
    public CaptionLabelCollection CaptionLabels { get; }
    Property Value
    Type Description
    CaptionLabelCollection

    CaptionVerticalAlignment

    Gets/Sets the value for CaptionVerticalAlignment

    Declaration
    public VerticalAlignment CaptionVerticalAlignment { get; set; }
    Property Value
    Type Description
    VerticalAlignment

    ColorTable

    Declaration
    protected Office2007Colors ColorTable { get; }
    Property Value
    Type Description
    Office2007Colors

    CreateParams

    Declaration
    protected override CreateParams CreateParams { get; }
    Property Value
    Type Description
    System.Windows.Forms.CreateParams

    DropShadow

    Gets or Set Value to Drop Shadow to the form

    Declaration
    public bool DropShadow { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnableTouchMode

    Gets/Sets touch enabled

    Declaration
    public bool EnableTouchMode { get; set; }
    Property Value
    Type Description
    System.Boolean

    IconAlign

    Declaration
    public HorizontalAlignment IconAlign { get; set; }
    Property Value
    Type Description
    System.Windows.Forms.HorizontalAlignment

    IconTextRelation

    Declaration
    public LeftRightAlignment IconTextRelation { get; set; }
    Property Value
    Type Description
    System.Windows.Forms.LeftRightAlignment

    InnerBorderVisibility

    Gets or sets the visibility of the inner border of the Form.

    Declaration
    public bool InnerBorderVisibility { get; set; }
    Property Value
    Type Description
    System.Boolean

    IsActive

    Declaration
    protected bool IsActive { get; }
    Property Value
    Type Description
    System.Boolean

    IsRightToLeft

    Declaration
    protected bool IsRightToLeft { get; }
    Property Value
    Type Description
    System.Boolean

    MetroColor

    Gets or Sets the value for CaptionBarColor BorderColor MetroColor

    Declaration
    public Color MetroColor { get; set; }
    Property Value
    Type Description
    System.Drawing.Color

    ShowMaximizeBox

    Gets / set the value to enable the MaximizeBox

    Declaration
    public bool ShowMaximizeBox { get; set; }
    Property Value
    Type Description
    System.Boolean

    ShowMinimizeBox

    Gets / set the value to enable the MinimizeBox

    Declaration
    public bool ShowMinimizeBox { get; set; }
    Property Value
    Type Description
    System.Boolean

    ShowMouseOver

    Gets or Sets Mouse over color for CaptionButtons

    Declaration
    public bool ShowMouseOver { get; set; }
    Property Value
    Type Description
    System.Boolean

    Methods

    ApplyScaleToControl(Single)

    applies the scaling

    Declaration
    public void ApplyScaleToControl(float sf)
    Parameters
    Type Name Description
    System.Single sf

    CreateAccessibilityInstance()

    Declaration
    protected override AccessibleObject CreateAccessibilityInstance()
    Returns
    Type Description
    System.Windows.Forms.AccessibleObject

    Dispose(Boolean)

    Clean up any resources being used.

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing

    true if managed resources should be disposed; otherwise, false.

    HideControlboxHighlights()

    Disabling the controlbox highlights

    Declaration
    public void HideControlboxHighlights()

    OnColorSchemeChanged()

    Occurs when ColorScheme property is changed.

    Declaration
    protected virtual void OnColorSchemeChanged()

    OnHandleCreated(EventArgs)

    Declaration
    protected override void OnHandleCreated(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    OnLoad(EventArgs)

    To define whether the customization needs to be applied

    Declaration
    protected override void OnLoad(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    OnLocationChanged(EventArgs)

    Occurs when Form Location is changed

    Declaration
    protected override void OnLocationChanged(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    OnMouseMove(MouseEventArgs)

    Declaration
    protected override void OnMouseMove(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseEventArgs e

    OnPaintBackground(PaintEventArgs)

    Declaration
    protected override void OnPaintBackground(PaintEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.PaintEventArgs e

    OnRightToLeftChanged(EventArgs)

    Declaration
    protected override void OnRightToLeftChanged(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    OnRightToLeftLayoutChanged(EventArgs)

    Declaration
    protected override void OnRightToLeftLayoutChanged(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    OnShown(EventArgs)

    Raises the System.Windows.Forms.Form.Shown event.

    Declaration
    protected override void OnShown(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    Event args that contains the event data

    OnStyleChanged(EventArgs)

    Declaration
    protected override void OnStyleChanged(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    ResetShowMaximizeBox()

    Reset the value of the ShowMaximizeBox

    Declaration
    public void ResetShowMaximizeBox()

    ResetShowMinimizeBox()

    Reset the value of the ShowMinimizeBox

    Declaration
    public void ResetShowMinimizeBox()

    ResetShowMinimizeeBox()

    Reset the value of the ShowMinimizeBox

    Declaration
    [Obsolete("ResetShowMinimizeeBox is deprecated, please use ResetShowMinimizeBox instead.")]
    public void ResetShowMinimizeeBox()

    SetBoundsCore(Int32, Int32, Int32, Int32, BoundsSpecified)

    Declaration
    protected override void SetBoundsCore(int x, int y, int width, int height, BoundsSpecified specified)
    Parameters
    Type Name Description
    System.Int32 x
    System.Int32 y
    System.Int32 width
    System.Int32 height
    System.Windows.Forms.BoundsSpecified specified

    SetClientSizeCore(Int32, Int32)

    Declaration
    protected override void SetClientSizeCore(int x, int y)
    Parameters
    Type Name Description
    System.Int32 x
    System.Int32 y

    WndProc(ref Message)

    Declaration
    protected override void WndProc(ref Message m)
    Parameters
    Type Name Description
    System.Windows.Forms.Message m

    Events

    CaptionBarPaint

    This Event will be triggered, when CaptionBar is painted and it is used to customize the CaptionBar.

    Declaration
    public event PaintEventHandler CaptionBarPaint
    Event Type
    Type Description
    System.Windows.Forms.PaintEventHandler
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved