WinForms

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

    Show / Hide Table of Contents

    Class ToolStripRadioButton

    ToolStripRadioButton class, that represents RadioButton item on ToolStrip.

    Inheritance
    System.Object
    ToolStripRadioButton
    QuickRadioButtonReflectable
    Namespace: Syncfusion.Windows.Forms.Tools
    Assembly: Syncfusion.Tools.Windows.dll
    Syntax
    public class ToolStripRadioButton : ToolStripButton

    Constructors

    ToolStripRadioButton()

    Constructor of the ToolStripRadioButton.

    Declaration
    public ToolStripRadioButton()

    Properties

    BackColor

    Gets or sets the background color for the item.

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

    A System.Drawing.Color that represents the background color of the item. The default is the value of the System.Windows.Forms.Control.DefaultBackColor property.

    BackgroundImage

    Gets or sets the background image displayed in the item.

    Declaration
    public override Image BackgroundImage { get; set; }
    Property Value
    Type Description
    System.Drawing.Image

    An System.Drawing.Image that represents the image to display in the background of the item.

    BackgroundImageLayout

    Gets or sets the background image layout used for the System.Windows.Forms.ToolStripItem.

    Declaration
    public override ImageLayout BackgroundImageLayout { get; set; }
    Property Value
    Type Description
    System.Windows.Forms.ImageLayout

    One of the System.Windows.Forms.ImageLayout values. The default value is System.Windows.Forms.ImageLayout.Tile.

    CheckAlign

    Gets or sets the horizontal and vertical alignment of the check mark on a ToolStripRadioButton control.

    Declaration
    public ContentAlignment CheckAlign { get; set; }
    Property Value
    Type Description
    System.Drawing.ContentAlignment

    One of the System.Drawing.ContentAlignment values. The default value is MiddleLeft.

    Exceptions
    Type Condition
    System.ComponentModel.InvalidEnumArgumentException

    The value assigned is not one of the System.Drawing.ContentAlignment enumeration values.

    Checked

    Gets or sets a value indicating whether the ToolStripRadioButton is pressed or not pressed.

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

    true if the ToolStripRadioButton is pressed in or not pressed in; otherwise, false. The default is false.

    CheckOnClick

    This property is not used, because ToolStripRadioButton automatically appears pressed in and not pressed in when clicked.

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

    CheckState

    Gets or sets a value indicating whether the ToolStripRadioButton is in the pressed or not pressed state by default, or is in an indeterminate state.

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

    One of the System.Windows.Forms.CheckState values. The default is Unchecked.

    DisplayStyle

    Gets or sets whether text and images are displayed on a ToolStripRadioButton.

    Declaration
    public ToolStripItemDisplayStyle DisplayStyle { get; set; }
    Property Value
    Type Description
    System.Windows.Forms.ToolStripItemDisplayStyle

    One of the System.Windows.Forms.ToolStripItemDisplayStyle values. The default is System.Windows.Forms.ToolStripItemDisplayStyle.ImageAndText.

    Font

    Gets or sets the System.Drawing.Font value for the ToolStripRadioButton .

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

    ForeColor

    Gets or sets the foreground color of the item.

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

    The foreground System.Drawing.Color of the item. The default is the value of the System.Windows.Forms.Control.DefaultForeColor property.

    GroupID

    Gets or sets group's identifier which is used to create groups of ToolStripRadioButton controls on the same parent.

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

    Image

    Gets or sets the image that is displayed on a ToolStripRadioButton.

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

    The System.Drawing.Image to be displayed.

    ImageAlign

    Gets or sets the alignment of the image on a ToolStripRadioButton.

    Declaration
    public ContentAlignment ImageAlign { get; set; }
    Property Value
    Type Description
    System.Drawing.ContentAlignment

    One of the System.Drawing.ContentAlignment values. The default is System.Drawing.ContentAlignment.MiddleLeft.

    ImageScaling

    Gets or sets a value indicating whether an image on a ToolStripRadioButton is automatically resized to fit in a container.

    Declaration
    public ToolStripItemImageScaling ImageScaling { get; set; }
    Property Value
    Type Description
    System.Windows.Forms.ToolStripItemImageScaling

    One of the System.Windows.Forms.ToolStripItemImageScaling values. The default is System.Windows.Forms.ToolStripItemImageScaling.SizeToFit.

    ImageTransparentColor

    Gets or sets the color to treat as transparent in a ToolStripRadioButton image.

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

    One of the System.Drawing.Color values.

    RightToLeftAutoMirrorImage

    Mirrors automatically the ToolStripRadioButton image when the System.Windows.Forms.ToolStripItem.RightToLeft property is set to System.Windows.Forms.RightToLeft.Yes.

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

    true to automatically mirror the image; otherwise, false. The default is false.

    TextDirection

    Gets the orientation of text used on a ToolStripRadioButton.

    Declaration
    public override ToolStripTextDirection TextDirection { get; set; }
    Property Value
    Type Description
    System.Windows.Forms.ToolStripTextDirection

    One of the System.Windows.Forms.ToolStripTextDirection values.

    TextImageRelation

    Gets or sets the position of ToolStripRadioButton text and image relative to each other.

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

    One of the System.Windows.Forms.TextImageRelation values. The default is System.Windows.Forms.TextImageRelation.ImageBeforeText.

    Methods

    CheckCurrentButton()

    Method updates state of all System.Windows.Forms.RadioButton controls which have the same owner as current System.Windows.Forms.RadioButton control.

    Declaration
    protected virtual void CheckCurrentButton()

    CheckCurrentUncheckedButton()

    Methods checks System.Windows.Forms.RadioButton control if there are no checked System.Windows.Forms.RadioButton controls with same GroupID and owner.

    Declaration
    protected virtual void CheckCurrentUncheckedButton()

    CheckRemainingUncheckedButtons()

    Methods checks first System.Windows.Forms.RadioButton control if there are no checked System.Windows.Forms.RadioButton controls with same GroupID and owner among the remaining controls.

    Declaration
    protected virtual void CheckRemainingUncheckedButtons()

    Finalize()

    Declaration
    protected override void Finalize()

    GetButtonBackgroundRect(ToolStripItem, Rectangle)

    Declaration
    protected Rectangle GetButtonBackgroundRect(ToolStripItem item, Rectangle rc)
    Parameters
    Type Name Description
    System.Windows.Forms.ToolStripItem item
    System.Drawing.Rectangle rc
    Returns
    Type Description
    System.Drawing.Rectangle

    GetPreferredSize(Size)

    Retrieves the size of a rectangular area into which a control can be fit.

    Declaration
    public override Size GetPreferredSize(Size constrainingSize)
    Parameters
    Type Name Description
    System.Drawing.Size constrainingSize

    The custom-sized area for a control.

    Returns
    Type Description
    System.Drawing.Size

    A System.Drawing.Size ordered pair, representing the width and height of a rectangle.

    OnClick(EventArgs)

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

    OnLayout(LayoutEventArgs)

    Declaration
    protected override void OnLayout(LayoutEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.LayoutEventArgs e

    OnOwnerChanged(EventArgs)

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

    OnPaint(PaintEventArgs)

    Declaration
    protected override void OnPaint(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
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved