menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class TextBoxExt - API Reference

    Show / Hide Table of Contents

    Class TextBoxExt

    Represents a class to apply the theme for the TextBoxExt control.

    Inheritance
    System.Object
    TextBoxExt
    ShortcutTextBox
    TextBoxEx
    MaskedEditBox
    NumberTextBoxBase
    Implements
    IThemeProvider
    System.ComponentModel.ISupportInitialize
    System.Runtime.Serialization.ISerializable
    IVisualStyle
    Namespace: Syncfusion.Windows.Forms.Tools
    Assembly: Syncfusion.Shared.Base.dll
    Syntax
    public class TextBoxExt : TextBox, IThemeProvider, ISupportInitialize, ISerializable, IVisualStyle
    Remarks

    The Border3DStyle property provides you advanced 3D border options. The BorderColor property lets you specify custom single border colors.

    Constructors

    TextBoxExt()

    Creates a new instance of the TextBoxExt class.

    Declaration
    public TextBoxExt()

    TextBoxExt(SerializationInfo, StreamingContext)

    Declaration
    protected TextBoxExt(SerializationInfo info, StreamingContext context)
    Parameters
    Type Name Description
    System.Runtime.Serialization.SerializationInfo info
    System.Runtime.Serialization.StreamingContext context

    Properties

    BeforeTouchSize

    Gets/Sets Control size before touch enabled

    Declaration
    public Size BeforeTouchSize { get; set; }
    Property Value
    Type Description
    System.Drawing.Size

    Border3DStyle

    Gets or sets the 3D border style for the control.

    Declaration
    public virtual Border3DStyle Border3DStyle { get; set; }
    Property Value
    Type Description
    System.Windows.Forms.Border3DStyle
    Remarks

    This property is used only when BorderStyle is Fixed3D.

    BorderColor

    Gets or sets the single border color for the control.

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

    This property is used only when BorderStyle is FixedSingle.

    BorderSides

    Gets or sets the border sides for which you want the 3D border style applied.

    Declaration
    public virtual Border3DSide BorderSides { get; set; }
    Property Value
    Type Description
    System.Windows.Forms.Border3DSide
    Remarks

    This property is used only when BorderStyle is Fixed3D.

    CanApplyTheme

    Gets or sets a value indicating whether a SkinManager theme settings can be applied to the control.

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

    The default value is true.

    Remarks

    This property must be initialized before applying the VisualTheme />

    CanOverrideStyle

    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.

    Remarks

    By default, the control's element styles will not be overridden by theme style settings if the style is set in sample level. If this property is enabled, element style will be overridden by theme style settings event if it is set in sample level. This property should be enabled or disabled before calling the ThemeName property of the control.

    CharacterCasing

    Gets or sets the case of characters as they are typed.

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

    ControlName

    Gets the name of the control.

    Declaration
    public string ControlName { get; }
    Property Value
    Type Description
    System.String

    CornerRadius

    Gets or sets corner radius of control.

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

    Radius has to be not less than zero or half of minimum dimension (width or height) of control. If radius is zero, control has standard rectangular appearance.

    CreateParams

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

    DrawActiveWhenDisabled

    Indicates whether the text should be drawn active even when the control is disabled.

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

    False for default textbox behavior; True to draw the text enabled even when the control is disabled.

    EnableTouchMode

    Gets or sets value to enable or disable the Touchmode to the controls.

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

    Scale factor will be updated automatically if scalefactor is equal to 1

    FarImage

    Gets or sets the far image.

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

    FocusBorderColor

    Gets or sets the FocusBorderColor

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

    Font

    Overrides the base class font property.

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

    Initializing

    Gets a value indicating whether this TextBoxExt is initializing.

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

    true if initializing; otherwise, false.

    IsVisualStyleEnabled

    Gets a value indicating whether the visual style based theme is applied to the control and 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 the control. Otherwise returns false.

    MaximumSize

    Gets or sets the maximum size for the control.

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

    Metrocolor

    Gets or sets the metrocolor.

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

    MinimumSize

    Gets or sets the minimum size for the control.

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

    NearImage

    Gets or sets the near image.

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

    Office2007ColorScheme

    Office2007 color scheme.

    Declaration
    public Office2007Theme Office2007ColorScheme { get; set; }
    Property Value
    Type Description
    Office2007Theme

    Office2007ColorTable

    Gets color table for Office2007 visual style.

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

    Office2010ColorScheme

    Office2010 color scheme.

    Declaration
    public Office2010Theme Office2010ColorScheme { get; set; }
    Property Value
    Type Description
    Office2010Theme

    Office2010ColorTable

    Gets color table for Office2010 visual style.

    Declaration
    protected Office2010Colors Office2010ColorTable { get; }
    Property Value
    Type Description
    Office2010Colors

    OverflowIndicatorToolTip

    Overflow indicator ToolTip.

    Declaration
    protected ToolTipAdv OverflowIndicatorToolTip { get; set; }
    Property Value
    Type Description
    ToolTipAdv

    OverflowIndicatorToolTipText

    Gets or sets overflow indicator ToolTip text.

    Declaration
    public string OverflowIndicatorToolTipText { get; set; }
    Property Value
    Type Description
    System.String

    ShowOverflowIndicator

    Gets or sets overflow indicator visibility.

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

    ShowOverflowIndicatorToolTip

    Gets or sets can show overflow indicator ToolTip.

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

    Style

    Declaration
    public TextBoxExt.theme Style { get; set; }
    Property Value
    Type Description
    TextBoxExt.theme

    ThemeName

    Gets or sets the theme name of the control.

    Declaration
    public string ThemeName { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null.

    Remarks

    This ThemeStyle settings will be applied only when the VisualStyleBased theme has been applied to the control.

    ThemesEnabled

    Indicates whether XPThemes should be used when BorderStyle is set to Fixed3D.

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

    True to use XPThemes; False otherwise. Default is True.

    Remarks

    This property is used only when BorderStyle is Fixed3D.

    ThemeStyle

    Gets or sets the TextBoxExtVisualStyle value used to customize the appearance of the TextBoxExt.

    Declaration
    public TextBoxExtVisualStyle ThemeStyle { get; set; }
    Property Value
    Type Description
    TextBoxExtVisualStyle
    Remarks

    This ThemeStyle settings will be applied only when the VisualStyleBased theme has been applied to the control.

    UseBorderColorOnFocus

    Enables the FocusBorderColor property

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

    Methods

    ApplyScaleToControl(Single)

    Scale the control based on the scale factor passed in the argument.

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

    value to scale the factor based upon.

    BeginInit()

    Signals the object that initialization is starting.

    Declaration
    public virtual void BeginInit()

    CreateAccessibilityInstance()

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

    DefWndProc(ref Message)

    Sends the specified message to the default windows procedure.

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

    Dispose(Boolean)

    Dispose all created internal object

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

    EndInit()

    Signals the object that initialization is complete.

    Declaration
    public virtual void EndInit()

    GetActiveThemeName()

    Gets the active theme name of the control.

    Declaration
    public virtual string GetActiveThemeName()
    Returns
    Type Description
    System.String

    Returns the active theme name.

    GetControlName(String)

    Helps to override the ControlName property settings

    Declaration
    public virtual string GetControlName(string controlName)
    Parameters
    Type Name Description
    System.String controlName

    ControlName

    Returns
    Type Description
    System.String

    NCOverflowIndicatorPaint(Graphics, Rectangle, Rectangle)

    Overflow indicators drawing.

    Declaration
    protected virtual void NCOverflowIndicatorPaint(Graphics g, Rectangle left, Rectangle right)
    Parameters
    Type Name Description
    System.Drawing.Graphics g
    System.Drawing.Rectangle left
    System.Drawing.Rectangle right

    OnBorder3DStyleChanged(EventArgs)

    Raises the Border3DStyleChanged event.

    Declaration
    protected virtual void OnBorder3DStyleChanged(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    An EventArgs that contains the event data.

    Remarks

    Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.

    The OnBorder3DStyleChanged method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

    Note to Inheritors: When overriding OnBorder3DStyleChanged in a derived class, be sure to call the base class's OnBorder3DStyleChanged method so that registered delegates receive the event.

    OnBorderColorChanged(EventArgs)

    Raises the BorderColorChanged event.

    Declaration
    protected virtual void OnBorderColorChanged(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    An EventArgs that contains the event data.

    Remarks

    Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.

    The OnBorderColorChanged method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

    Note to Inheritors: When overriding OnBorderColorChanged in a derived class, be sure to call the base class's OnBorderColorChanged method so that registered delegates receive the event.

    OnBorderSidesChanged(EventArgs)

    Raises the BorderSidesChanged event.

    Declaration
    protected virtual void OnBorderSidesChanged(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    An EventArgs that contains the event data.

    Remarks

    Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.

    The OnBorderSidesChanged method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

    Note to Inheritors: When overriding OmBorderSidesChanged in a derived class, be sure to call the base class's OnBorderSidesChanged method so that registered delegates receive the event.

    OnBorderStyleChanged(EventArgs)

    Raises the System.Windows.Forms.TextBoxBase.BorderStyleChanged event.

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

    An System.EventArgs that contains the event data.

    OnCanApplyThemeChanged(Boolean)

    Helps to override the CanApplyTheme property settings

    Declaration
    public virtual void OnCanApplyThemeChanged(bool canApplyTheme)
    Parameters
    Type Name Description
    System.Boolean canApplyTheme

    OnCanOverrideStyleChanged(Boolean)

    Helps to override the CanOverriderStyle property settings

    Declaration
    public virtual void OnCanOverrideStyleChanged(bool canOverrideStyle)
    Parameters
    Type Name Description
    System.Boolean canOverrideStyle

    OnCharacterCasingChanged(EventArgs)

    Raises the CharacterCasingChanged event.

    Declaration
    public virtual void OnCharacterCasingChanged(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    An EventArgs that contains the event data.

    Remarks

    Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.

    The OnCharacterCasingChanged method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

    Note to Inheritors: When overriding OnCharacterCasingChanged in a derived class, be sure to call the base class's OnCharacterCasingChanged method so that registered delegates receive the event.

    OnEnabledChanged(EventArgs)

    Raises the System.Windows.Forms.Control.EnabledChanged event.

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

    An System.EventArgs that contains the event data.

    OnFontChanged(EventArgs)

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

    OnGotFocus(EventArgs)

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

    OnHandleCreated(EventArgs)

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

    OnHandleDestroyed(EventArgs)

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

    OnLostFocus(EventArgs)

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

    OnMaximumSizeChanged(EventArgs)

    Raises the MaximumSizeChanged event.

    Declaration
    protected virtual void OnMaximumSizeChanged(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    An EventArgs that contains the event data.

    Remarks

    Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.

    The OnMaximumSizeChanged method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

    Note to Inheritors: When overriding OnMaximumSizeChanged in a derived class, be sure to call the base class's OnMaximumSizeChanged method so that registered delegates receive the event.

    OnMinimumSizeChanged(EventArgs)

    Raises the MinimumSizeChanged event.

    Declaration
    protected virtual void OnMinimumSizeChanged(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    An EventArgs that contains the event data.

    Remarks

    Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.

    The OnMinimumSizeChanged method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

    Note to Inheritors: When overriding OnMinimumSizeChanged in a derived class, be sure to call the base class's OnMinimumSizeChanged method so that registered delegates receive the event.

    OnMouseDown(MouseEventArgs)

    Event will be triggered while clicking on the TextBoxExt.

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

    OnMouseEnter(EventArgs)

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

    OnMouseLeave(EventArgs)

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

    OnMultilineChanged(EventArgs)

    Declaration
    protected override void OnMultilineChanged(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

    OnParentChanged(EventArgs)

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

    OnSizeChanged(EventArgs)

    Raises the System.Windows.Forms.Control.SizeChanged event.

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

    An System.EventArgs that contains the event data.

    OnTextChanged(EventArgs)

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

    OnThemeNameChanged(String)

    Helps to apply the ThemeName settings in control

    Declaration
    public virtual void OnThemeNameChanged(string themeName)
    Parameters
    Type Name Description
    System.String themeName

    ThemeName

    OnThemesEnabledChanged(EventArgs)

    Raises the ThemesEnabledChanged event.

    Declaration
    protected virtual void OnThemesEnabledChanged(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    An EventArgs that contains the event data.

    Remarks

    Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.

    The OnThemesEnabledChanged method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

    Note to Inheritors: When overriding OnThemesEnabledChanged in a derived class, be sure to call the base class's OnThemesEnabledChanged method so that registered delegates receive the event.

    RaiseThemeChanged(Object, ThemeChangedEventArgs)

    Raises the ThemeNameChanged event when theme name changed.

    Declaration
    protected virtual void RaiseThemeChanged(object sender, ThemeChangedEventArgs args)
    Parameters
    Type Name Description
    System.Object sender

    The sender value.

    ThemeChangedEventArgs args

    A ThemeChangedEventArgs contains the event data.

    WndProc(ref Message)

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

    Events

    Border3DStyleChanged

    This event is raised if the Border3DStyle property is changed.

    Declaration
    public event EventHandler Border3DStyleChanged
    Event Type
    Type Description
    System.EventHandler

    BorderColorChanged

    This event is raised when the value of the BorderColor property is changed.

    Declaration
    public event EventHandler BorderColorChanged
    Event Type
    Type Description
    System.EventHandler

    BorderSidesChanged

    This event is raised if the BorderSides property is changed.

    Declaration
    public event EventHandler BorderSidesChanged
    Event Type
    Type Description
    System.EventHandler

    CharacterCasingChanged

    This event is raised if the CharacterCasing property is changed.

    Declaration
    public event EventHandler CharacterCasingChanged
    Event Type
    Type Description
    System.EventHandler

    MaximumSizeChanged

    This event is raised if the MaximumSize property is changed.

    Declaration
    public event EventHandler MaximumSizeChanged
    Event Type
    Type Description
    System.EventHandler

    MinimumSizeChanged

    This event is raised if the MinimumSize property is changed.

    Declaration
    public event EventHandler MinimumSizeChanged
    Event Type
    Type Description
    System.EventHandler

    ThemeNameChanged

    Occurs when theme name of the control has changed.

    Declaration
    public event ThemeChangedEventHandler ThemeNameChanged
    Event Type
    Type Description
    ThemeChangedEventHandler

    ThemesEnabledChanged

    This event is raised if the ThemesEnabled property is changed.

    Declaration
    public event EventHandler ThemesEnabledChanged
    Event Type
    Type Description
    System.EventHandler

    Explicit Interface Implementations

    IVisualStyle.VisualTheme

    Declaration
    string IVisualStyle.VisualTheme { get; set; }
    Returns
    Type Description
    System.String

    IThemeProvider.BaseThemeName

    Gets or sets the Base Theme name of the theme

    Declaration
    string IThemeProvider.BaseThemeName { get; set; }
    Returns
    Type Description
    System.String

    ISerializable.GetObjectData(SerializationInfo, StreamingContext)

    Declaration
    void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
    Parameters
    Type Name Description
    System.Runtime.Serialization.SerializationInfo info
    System.Runtime.Serialization.StreamingContext context

    Implements

    IThemeProvider
    System.ComponentModel.ISupportInitialize
    System.Runtime.Serialization.ISerializable
    IVisualStyle
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved