WinForms

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

    Show / Hide Table of Contents

    Class CaptionPainter

    Inheritance
    System.Object
    NonFinalizeDisposable
    Disposable
    CaptionPainter
    Implements
    System.IDisposable
    Inherited Members
    NonFinalizeDisposable.Dispose()
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Syncfusion.Windows.Forms.Tools
    Assembly: Syncfusion.Tools.Windows.dll
    Syntax
    public class CaptionPainter : Disposable, IDisposable

    Constructors

    CaptionPainter(DockHostController)

    Constructor of the CaptionPainter

    Declaration
    public CaptionPainter(DockHostController dhc)
    Parameters
    Type Name Description
    DockHostController dhc

    The DockHostController instance.

    Fields

    btnHover

    Declaration
    protected CaptionButton btnHover
    Field Value
    Type Description
    CaptionButton

    btnPressed

    Declaration
    protected CaptionButton btnPressed
    Field Value
    Type Description
    CaptionButton

    buttonSizeFactor

    Holds the constant value for caption bution size adjusting factor

    Declaration
    protected const int buttonSizeFactor = 6
    Field Value
    Type Description
    System.Int32

    DEF_BORDER_WIDTH

    Declaration
    protected const int DEF_BORDER_WIDTH = 1
    Field Value
    Type Description
    System.Int32

    DEF_BUTTON_SIDE_INDENT

    Declaration
    protected const int DEF_BUTTON_SIDE_INDENT = 3
    Field Value
    Type Description
    System.Int32

    DEF_BUTTON_SPACE_BETWEEN

    Declaration
    protected const int DEF_BUTTON_SPACE_BETWEEN = 1
    Field Value
    Type Description
    System.Int32

    DEF_BUTTON_THEMED_SIZE

    Declaration
    protected const int DEF_BUTTON_THEMED_SIZE = 20
    Field Value
    Type Description
    System.Int32

    DEF_BUTTON_TOP_INDENT

    Declaration
    protected const int DEF_BUTTON_TOP_INDENT = 4
    Field Value
    Type Description
    System.Int32

    DEF_CAPTION_TOP_INDENT

    Declaration
    protected const int DEF_CAPTION_TOP_INDENT = 2
    Field Value
    Type Description
    System.Int32

    DEF_ICON_INDENT

    Declaration
    protected const int DEF_ICON_INDENT = 2
    Field Value
    Type Description
    System.Int32

    DEF_ICON_SIZE

    Declaration
    protected const int DEF_ICON_SIZE = 16
    Field Value
    Type Description
    System.Int32

    dhcOwner

    Declaration
    protected DockHostController dhcOwner
    Field Value
    Type Description
    DockHostController

    ftCaption

    Declaration
    protected Font ftCaption
    Field Value
    Type Description
    System.Drawing.Font

    labelAlignment

    Declaration
    protected DockLabelAlignmentStyle labelAlignment
    Field Value
    Type Description
    DockLabelAlignmentStyle

    m_buttons

    Declaration
    protected CaptionButtonsCollection m_buttons
    Field Value
    Type Description
    CaptionButtonsCollection

    nCaptionButtonIndex

    Declaration
    protected int nCaptionButtonIndex
    Field Value
    Type Description
    System.Int32

    nTextOffset

    Declaration
    protected const int nTextOffset = 2
    Field Value
    Type Description
    System.Int32

    tdExplorerBar

    Declaration
    protected ThemedControlDrawing tdExplorerBar
    Field Value
    Type Description
    ThemedControlDrawing

    tdWindow

    Declaration
    protected ThemedControlDrawing tdWindow
    Field Value
    Type Description
    ThemedControlDrawing

    toolTip

    Declaration
    protected ToolTip toolTip
    Field Value
    Type Description
    System.Windows.Forms.ToolTip

    Properties

    BorderWidth

    Returns the default border width.

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

    Buttons

    Returns the CaptionButtonsCollection.

    Declaration
    public CaptionButtonsCollection Buttons { get; }
    Property Value
    Type Description
    CaptionButtonsCollection

    CaptionButtonHeight

    Returns the caption button height.

    Declaration
    public static int CaptionButtonHeight { get; }
    Property Value
    Type Description
    System.Int32

    CaptionButtonWidth

    Returns the Caption Button width.

    Declaration
    public static int CaptionButtonWidth { get; }
    Property Value
    Type Description
    System.Int32

    CaptionHeight

    Returns the Caption height.

    Declaration
    public static int CaptionHeight { get; }
    Property Value
    Type Description
    System.Int32

    CaptionRect

    Returns the caption rectangle.

    Declaration
    public Rectangle CaptionRect { get; }
    Property Value
    Type Description
    System.Drawing.Rectangle

    CaptionTopIndent

    Declaration
    protected int CaptionTopIndent { get; }
    Property Value
    Type Description
    System.Int32

    ImageRect

    Declaration
    protected Rectangle ImageRect { get; }
    Property Value
    Type Description
    System.Drawing.Rectangle

    TextRect

    Declaration
    protected Rectangle TextRect { get; }
    Property Value
    Type Description
    System.Drawing.Rectangle

    Methods

    Dispose(Boolean)

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

    DrawAutoHideButton(Graphics, Rectangle, Color)

    Declaration
    protected virtual void DrawAutoHideButton(Graphics gph, Rectangle rcbtn, Color clrbtn)
    Parameters
    Type Name Description
    System.Drawing.Graphics gph
    System.Drawing.Rectangle rcbtn
    System.Drawing.Color clrbtn

    DrawCloseButton(Graphics, Rectangle, Color)

    Declaration
    protected virtual void DrawCloseButton(Graphics gph, Rectangle rcbtn, Color clrbtn)
    Parameters
    Type Name Description
    System.Drawing.Graphics gph
    System.Drawing.Rectangle rcbtn
    System.Drawing.Color clrbtn

    DrawHoverBorder(Graphics, Rectangle)

    Declaration
    protected virtual void DrawHoverBorder(Graphics gph, Rectangle rcbtn)
    Parameters
    Type Name Description
    System.Drawing.Graphics gph
    System.Drawing.Rectangle rcbtn

    DrawImage(Graphics)

    Declaration
    protected virtual void DrawImage(Graphics gph)
    Parameters
    Type Name Description
    System.Drawing.Graphics gph

    DrawMaximizeButton(Graphics, Rectangle, Color)

    Declaration
    protected virtual void DrawMaximizeButton(Graphics gph, Rectangle rcBth, Color clBtn)
    Parameters
    Type Name Description
    System.Drawing.Graphics gph
    System.Drawing.Rectangle rcBth
    System.Drawing.Color clBtn

    DrawMenuButton(Graphics, Rectangle, Color)

    Declaration
    protected virtual void DrawMenuButton(Graphics gph, Rectangle rcBth, Color clBtn)
    Parameters
    Type Name Description
    System.Drawing.Graphics gph
    System.Drawing.Rectangle rcBth
    System.Drawing.Color clBtn

    DrawPressedBorder(Graphics, Rectangle)

    Declaration
    protected virtual void DrawPressedBorder(Graphics gph, Rectangle rcbtn)
    Parameters
    Type Name Description
    System.Drawing.Graphics gph
    System.Drawing.Rectangle rcbtn

    DrawRestoreButton(Graphics, Rectangle, Color)

    Declaration
    protected virtual void DrawRestoreButton(Graphics g, Rectangle rcBth, Color clBtn)
    Parameters
    Type Name Description
    System.Drawing.Graphics g
    System.Drawing.Rectangle rcBth
    System.Drawing.Color clBtn

    DrawWithHighlight()

    Declaration
    protected bool DrawWithHighlight()
    Returns
    Type Description
    System.Boolean

    GetButtonAt(Point)

    Returns the caption button from the specified point

    Declaration
    public virtual CaptionButton GetButtonAt(Point pt)
    Parameters
    Type Name Description
    System.Drawing.Point pt

    The coordinate point.

    Returns
    Type Description
    CaptionButton

    The caption button.

    GetButtonImageBounds(CaptionButtonType)

    Returns the Caption Button image bounds.

    Declaration
    public virtual Rectangle GetButtonImageBounds(CaptionButtonType buttonType)
    Parameters
    Type Name Description
    CaptionButtonType buttonType

    The CaptionButtonType.

    Returns
    Type Description
    System.Drawing.Rectangle

    GetCaptionButtonBounds(Int32)

    Returns the CaptionButton Bounds

    Declaration
    public virtual Rectangle GetCaptionButtonBounds(int index)
    Parameters
    Type Name Description
    System.Int32 index

    The index of the caption button.

    Returns
    Type Description
    System.Drawing.Rectangle

    GetCaptionButtonIndex()

    Returns the caption button index

    Declaration
    public virtual int GetCaptionButtonIndex()
    Returns
    Type Description
    System.Int32

    The index of the caption button.

    GetHitButton()

    Gets the caption button.

    Declaration
    public virtual CaptionButton GetHitButton()
    Returns
    Type Description
    CaptionButton

    The caption button.

    HitTest(MouseAction, Point)

    Returns the Caption hit area.

    Declaration
    public virtual CaptionPainter.CaptionHitTest HitTest(MouseAction action, Point pt)
    Parameters
    Type Name Description
    MouseAction action

    The mouse action on caption

    System.Drawing.Point pt

    The coordinate point.

    Returns
    Type Description
    CaptionPainter.CaptionHitTest

    Owner_SystemColorsChanged(Object, EventArgs)

    Declaration
    protected void Owner_SystemColorsChanged(object sender, EventArgs e)
    Parameters
    Type Name Description
    System.Object sender
    System.EventArgs e

    PaintCaption(Graphics, Pen)

    Paint the caption.

    Declaration
    public virtual void PaintCaption(Graphics gph, Pen pen)
    Parameters
    Type Name Description
    System.Drawing.Graphics gph

    The Graphics objects

    System.Drawing.Pen pen

    The Pen which needs to paint the caption.

    ProcessMouseMove(MouseEventArgs)

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

    RefreshCaptionButtonsCollection()

    Declaration
    protected void RefreshCaptionButtonsCollection()

    ResetCaptonButtonsHitTest()

    Declaration
    protected void ResetCaptonButtonsHitTest()

    SetCaptionButtonIndex(Point)

    Declaration
    protected virtual void SetCaptionButtonIndex(Point pt)
    Parameters
    Type Name Description
    System.Drawing.Point pt

    Implements

    System.IDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved