Class RadTextBox
Represents a RadTextBox. The RadTextBox control serves as a simple wrapper for RadTextBoxElement which in turn wraps RadTextBoxItem. All logic and presentation features are implemented in a parallel hierarchy of objects. For this reason, RadTextBoxElement may be nested in any other telerik control, item, or element. RadTextBox acts to transfer events to and from its corresponding instance of the RadTextBoxElement.
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
[TelerikToolboxCategory("Editors")]
public class RadTextBox : RadTextBoxBase, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IPCHost, IAnalyticsProvider, ISupportRootUIAutomation
Constructors
RadTextBox()
Initializes a new instance of the RadTextBox control.
Declaration
public RadTextBox()
Properties
CausesValidation
Gets or sets a value indicating whether the control causes validation to be performed on any controls that require validation when it receives focus.
Declaration
public bool CausesValidation { get; set; }
Property Value
System.Boolean
|
CreateParams
Gets the creation parameters for the control, including extended styles for proper rendering behavior.
Declaration
protected override CreateParams CreateParams { get; }
Property Value
System.Windows.Forms.CreateParams
|
EmbeddedLabelText
Gets or sets the text of the embedded label.
Declaration
public string EmbeddedLabelText { get; set; }
Property Value
System.String
|
EnableUIAutomation
Gets or sets a value indicating whether the UI Automation functionality is enabled or disabled for this control.
Declaration
public override bool EnableUIAutomation { get; set; }
Property Value
System.Boolean
|
Overrides
Implements
NullText
Gets or sets the text that is displayed when the text box is empty or contains a null value.
Declaration
[RadDefaultValue("NullText", typeof(RadTextBoxItem))]
public string NullText { get; set; }
Property Value
System.String
|
ShowClearButton
Gets or sets a value indicating whether a clear button is displayed within the text box to allow users to easily clear the content.
Declaration
public bool ShowClearButton { get; set; }
Property Value
System.Boolean
|
ShowEmbeddedLabel
Gets or sets a value indicating whether an embedded label is displayed within the text box.
Declaration
public bool ShowEmbeddedLabel { get; set; }
Property Value
System.Boolean
|
TextBoxElement
Gets the RadTextBoxElement instance that encapsulates the main functionality and visual presentation of the text box control.
Declaration
public RadTextBoxElement TextBoxElement { get; }
Property Value
RadTextBoxElement
|
UseGenericBorderPaint
Gets or sets a value indicating whether to use generic border painting to prevent text clipping issues with certain fonts or sizes.
Declaration
[RadDescription("UseGenericBorderPaint", typeof(RadTextBoxElement))]
[RadDefaultValue("UseGenericBorderPaint", typeof(RadTextBoxElement))]
public bool UseGenericBorderPaint { get; set; }
Property Value
System.Boolean
|
UseSystemPasswordChar
Gets or sets a value indicating whether the text should be displayed using the system's default password character for security purposes.
Declaration
public bool UseSystemPasswordChar { get; set; }
Property Value
System.Boolean
|
Methods
ControlDefinesThemeForElement(RadElement)
Determines whether the control defines a theme for the specified element.
Declaration
public override bool ControlDefinesThemeForElement(RadElement element)
Parameters
RadElement
element
The RadElement to check for theme definition. |
Returns
System.Boolean
True if the control defines a theme for the specified element; otherwise, false. |
Overrides
CreateAccessibilityInstance()
Creates an accessibility object that provides information about the control to assistive technologies.
Declaration
protected override AccessibleObject CreateAccessibilityInstance()
Returns
System.Windows.Forms.AccessibleObject
An AccessibleObject that represents the RadTextBox for accessibility purposes. |
CreateChildItems(RadElement)
Creates and initializes the child items for the RadTextBox control.
Declaration
protected override void CreateChildItems(RadElement parent)
Parameters
RadElement
parent
The parent RadElement that will contain the child items. |
Overrides
CreateTextBoxElement()
Creates the RadTextBoxElement that provides the core functionality for the text box control.
Declaration
protected virtual RadTextBoxElement CreateTextBoxElement()
Returns
RadTextBoxElement
A new instance of RadTextBoxElement configured for this control. |
Focus()
Sets input focus to the control.
Declaration
public bool Focus()
Returns
System.Boolean
True if the input focus request was successful; otherwise, false. |
InitializeTextElement()
Initializes the text element and configures its default properties for proper display and behavior.
Declaration
protected override void InitializeTextElement()
Overrides
ResetBackColorThemeOverrides()
Removes BackColor theme overrides and restores default theme values.
Declaration
protected override void ResetBackColorThemeOverrides()
Overrides
ResetForeColorThemeOverrides()
Removes ForeColor theme overrides and applies the current theme to the element tree.
Declaration
protected override void ResetForeColorThemeOverrides()
Overrides
SetBackColorThemeOverrides()
Applies BackColor theme overrides to all visual states of the text box element.
Declaration
protected override void SetBackColorThemeOverrides()
Overrides
SetForeColorThemeOverrides()
Applies ForeColor theme overrides to all visual states of the text box element.
Declaration
protected override void SetForeColorThemeOverrides()
Overrides
UnwireHostEvents()
Disconnects event handlers from the hosted text box control to prevent memory leaks and unwanted event handling.
Declaration
protected override void UnwireHostEvents()
Overrides
WireHostEvents()
Connects event handlers to the hosted text box control for keyboard and mouse interactions.
Declaration
protected override void WireHostEvents()
Overrides
WndProc(ref Message)
Processes Windows messages sent to the control, handling UI Automation and window destruction messages appropriately.
Declaration
protected override void WndProc(ref Message m)
Parameters
System.Windows.Forms.Message
m
The Windows Message to process. |
Overrides
Explicit Interface Implementations
ISupportRootUIAutomation.DisposeUIAutomationProvider()
Clears the UI Automation provider for this control.
Declaration
void ISupportRootUIAutomation.DisposeUIAutomationProvider()
Implements
ISupportRootUIAutomation.InitializeUIAutomationProvider()
Creates the UI Automation provider for this control.
Declaration
void ISupportRootUIAutomation.InitializeUIAutomationProvider()
Implements
ISupportRootUIAutomation.RootUIAutomationManager
Gets the UI Automation Manager.
Declaration
IRootUIAutomationManager ISupportRootUIAutomation.RootUIAutomationManager { get; }
Returns
IRootUIAutomationManager
|
Implements
ISupportRootUIAutomation.UIAutomationProvider
Gets the UI Automation Provider.
Declaration
IRadRawElementProviderFragmentRoot ISupportRootUIAutomation.UIAutomationProvider { get; }
Returns
IRadRawElementProviderFragmentRoot
|