menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ControlFormatsSettings - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class ControlFormatsSettings

    Represents a control that are used for EditControl formats settings.

    Inheritance
    System.Object
    ControlFormatsSettings
    Namespace: Syncfusion.Windows.Forms.Edit.Dialogs
    Assembly: Syncfusion.Edit.Windows.dll
    Syntax
    public class ControlFormatsSettings : UserControl

    Constructors

    ControlFormatsSettings()

    Initializes a new instance of the ControlFormatsSettings class.

    Declaration
    public ControlFormatsSettings()

    Fields

    ARROW_WIDTH

    Holds the width of the arrow.

    Declaration
    public const int ARROW_WIDTH = 12
    Field Value
    Type
    System.Int32

    Properties

    Formats

    Gets or sets the list of formats to be edited. If FormatsSelector is set, this property will return selection of the FormatsSelector. If FormatsSelector is set, this property will return selection of the FormatsSelector.

    Declaration
    public IList Formats { get; set; }
    Property Value
    Type
    System.Collections.IList

    FormatsSelector

    Gets or sets a control that is used for selecting formats.

    Declaration
    public ControlFormatsList FormatsSelector { get; set; }
    Property Value
    Type
    ControlFormatsList

    isLocked

    Gets value indication whether event handling is locked.

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

    Methods

    DisableControls()

    Disables controls and sets empty values.

    Declaration
    protected void DisableControls()

    Dispose(Boolean)

    Clean up any resources being used.

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

    True to release both managed and unmanaged resources; false to release only unmanaged resources.

    DrawComboItem(ComboListBox, Brush, DrawItemEventArgs)

    Draws combo item for combobox with color rectangles.

    Declaration
    protected void DrawComboItem(ComboListBox combo, Brush currentBrush, DrawItemEventArgs e)
    Parameters
    Type Name Description
    ComboListBox combo

    ComboBox to draw.

    System.Drawing.Brush currentBrush

    Current brush to use.

    System.Windows.Forms.DrawItemEventArgs e

    DrawItemEventArgs.

    EnableControls()

    Enables all controls.

    Declaration
    protected void EnableControls()

    GetColor(String)

    Get color by name.

    Declaration
    protected Color GetColor(string color)
    Parameters
    Type Name Description
    System.String color

    Color name or Empty.

    Returns
    Type Description
    System.Drawing.Color

    Color value.

    GetColorName(Color)

    Gets color name. Empty colors are returned correctly.

    Declaration
    protected string GetColorName(Color color)
    Parameters
    Type Name Description
    System.Drawing.Color color

    Color.

    Returns
    Type Description
    System.String

    Color name.

    GetComboBoxValue(ComboBoxAdv)

    Gets selected value of the combobox.

    Declaration
    protected string GetComboBoxValue(ComboBoxAdv combo)
    Parameters
    Type Name Description
    ComboBoxAdv combo

    Combobox.

    Returns
    Type Description
    System.String

    Selected value or empty string if no value is selected.

    GetFontStyle(String)

    Gets font style from string representation of SimpleFontStyle.

    Declaration
    protected FontStyle GetFontStyle(string styleString)
    Parameters
    Type Name Description
    System.String styleString

    SimpleFontStyle string representation.

    Returns
    Type Description
    System.Drawing.FontStyle

    FontStyle.

    GetFormatStrings(Format)

    Gets string representation of formats data.

    Declaration
    protected ControlFormatsSettings.FormatStringData GetFormatStrings(Format format)
    Parameters
    Type Name Description
    Format format

    Format. Can not be null.

    Returns
    Type Description
    ControlFormatsSettings.FormatStringData

    FormatStringData structure.

    GetMergedFormatData()

    Gets merged string representation of formats.

    Declaration
    protected ControlFormatsSettings.FormatStringData GetMergedFormatData()
    Returns
    Type Description
    ControlFormatsSettings.FormatStringData

    String representation of formats list.

    GetSimpleFontStyle(Boolean, Boolean)

    Converts bold and italic values combination to SimpleFontStyle.

    Declaration
    protected ControlFormatsSettings.SimpleFontStyle GetSimpleFontStyle(bool bold, bool italic)
    Parameters
    Type Name Description
    System.Boolean bold

    Font style bold value.

    System.Boolean italic

    Font style italic value.

    Returns
    Type Description
    ControlFormatsSettings.SimpleFontStyle

    SimpleFontStyle value.

    InitializeCombos()

    Initializes comboboxes.

    Declaration
    protected void InitializeCombos()

    LockEventProcessing()

    Locks processing of events.

    Declaration
    protected void LockEventProcessing()

    MergeFormatData(ControlFormatsSettings.FormatStringData, ControlFormatsSettings.FormatStringData)

    Merges formats string representations.

    Declaration
    protected ControlFormatsSettings.FormatStringData MergeFormatData(ControlFormatsSettings.FormatStringData arg1, ControlFormatsSettings.FormatStringData arg2)
    Parameters
    Type Name Description
    ControlFormatsSettings.FormatStringData arg1

    First format representation.

    ControlFormatsSettings.FormatStringData arg2

    Second format representation.

    Returns
    Type Description
    ControlFormatsSettings.FormatStringData

    Merged formats string representation.

    MergeString(String, String)

    Merges 2 strings. If both string have the same value, resulting string will have this value, otherwise empty string will be returned.

    Declaration
    protected string MergeString(string str1, string str2)
    Parameters
    Type Name Description
    System.String str1

    String 1.

    System.String str2

    String 2.

    Returns
    Type Description
    System.String

    If both string have the same value, method returns this value, otherwise empty string will be returned.

    OnChanged()

    Raises Changed event.

    Declaration
    protected void OnChanged()

    SelectItemByValue(ComboBoxAdv, Object)

    Selects combobox item by value.

    Declaration
    protected void SelectItemByValue(ComboBoxAdv combo, object value)
    Parameters
    Type Name Description
    ComboBoxAdv combo

    Combobox

    System.Object value

    value to be selected.

    UnlockEventProcessing()

    Unlocks processing of events.

    Declaration
    protected void UnlockEventProcessing()

    UpdateFormats(ControlFormatsSettings.FormatStringData)

    Updates all formats with nonempty data from "data" argument.

    Declaration
    protected void UpdateFormats(ControlFormatsSettings.FormatStringData data)
    Parameters
    Type Name Description
    ControlFormatsSettings.FormatStringData data

    Data values.

    UpdateSettingsFromFormats()

    Updates all settings.

    Declaration
    protected void UpdateSettingsFromFormats()

    Events

    Changed

    Occurs when user changes control format settings.

    Declaration
    public event EventHandler Changed
    Event Type
    Type
    System.EventHandler
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved