Class
TextBox

Wraps a TextBox element.

Definition

Namespace:ArtOfTest.WebAii.Silverlight.UI

Assembly:ArtOfTest.WebAii.dll

Syntax:

cs-api-definition
public class TextBox : Control, IAutomationPeer, IPeerConverter, IControl, ITextBox, IFrameworkElement, ITargetElement

Inheritance: objectAutomationObject<FrameworkElement>FrameworkElementSilverlightTestElementControlTextBox

Derived Classes: DatePickerTextBoxExtendedTextBoxPickerTextBoxRadWatermarkTextBox

Implements: IAutomationPeerIControlIFrameworkElementIPeerConverterITargetElementITextBox

Inherited Members Control.IsTabStopPropertyControl.TabIndexPropertyControl.TabNavigationPropertyControl.PaddingPropertyControl.HorizontalContentAlignmentPropertyControl.VerticalContentAlignmentPropertyControl.BackgroundPropertyControl.BorderBrushPropertyControl.BorderThicknessPropertyControl.FontSizePropertyControl.ForegroundPropertyControl.IsEnabledPropertyControl.FontFamilyPropertyControl.FontStretchPropertyControl.FontStylePropertyControl.FontWeightPropertyControl.IsTabStopControl.TabIndexControl.TabNavigationControl.PaddingControl.HorizontalContentAlignmentControl.VerticalContentAlignmentControl.BackgroundControl.BorderBrushControl.BorderThicknessControl.FontSizeControl.ForegroundControl.IsEnabledControl.FontFamilyControl.FontStretchControl.FontStyleControl.FontWeightSilverlightTestElement.UseLayoutRoundingPropertySilverlightTestElement.UseLayoutRoundingFrameworkElement.ActualWidthPropertyFrameworkElement.ActualHeightPropertyFrameworkElement.WidthPropertyFrameworkElement.HeightPropertyFrameworkElement.MinWidthPropertyFrameworkElement.MaxWidthPropertyFrameworkElement.MinHeightPropertyFrameworkElement.MaxHeightPropertyFrameworkElement.HorizontalAlignmentPropertyFrameworkElement.VerticalAlignmentPropertyFrameworkElement.MarginPropertyFrameworkElement.DesiredSizePropertyFrameworkElement.RenderSizePropertyFrameworkElement.NamePropertyFrameworkElement.TagPropertyFrameworkElement.DataContextPropertyFrameworkElement.OpacityPropertyFrameworkElement.ClipPropertyFrameworkElement.RenderTransformPropertyFrameworkElement.OpacityMaskPropertyFrameworkElement.RenderTransformOriginPropertyFrameworkElement.IsHitTestVisiblePropertyFrameworkElement.VisibilityPropertyFrameworkElement.GetIdentifier(out string, out string)FrameworkElement.IsChild(FrameworkElement)FrameworkElement.GetChildTagIndex(FrameworkElement)FrameworkElement.InitializeMappings(MappingsCollection)FrameworkElement.As<T>()FrameworkElement.CastAs<T>()FrameworkElement.SetProxy(bool)FrameworkElement.SetUid(string)FrameworkElement.SetFindInfo(VisualFindInfo)FrameworkElement.SetXamlTag(string)FrameworkElement.AssignReference(AutomationReference)FrameworkElement.KeyPress(Keys, int, int, int)FrameworkElement.GetRectangle()FrameworkElement.GetRectangle(FrameworkElement)FrameworkElement.GetIntRectangle()FrameworkElement.IsHitTest()FrameworkElement.IsHitTest(bool)FrameworkElement.IsHitTest(FrameworkElement, bool)FrameworkElement.Highlight()FrameworkElement.Highlight(bool)FrameworkElement.Parent()FrameworkElement.Parent<T>()FrameworkElement.Parent(string)FrameworkElement.Parent(string, bool)FrameworkElement.GetNextSibling()FrameworkElement.GetPrevSibling()FrameworkElement.NextSibling(string)FrameworkElement.NextSibling<T>()FrameworkElement.PreviousSibling(string)FrameworkElement.PreviousSibling<T>()FrameworkElement.AnySibling<T>()FrameworkElement.AnySibling(string)FrameworkElement.GetScreenRectangle()FrameworkElement.ScrollToVisible()FrameworkElement.ScrollToVisible(ScrollToVisibleType)FrameworkElement.EnsureClickable()FrameworkElement.ToXml()FrameworkElement.Refresh()FrameworkElement.Equals(object)FrameworkElement.GetHashCode()FrameworkElement.GetProperties()FrameworkElement.GetAttachedProperty<T>(string, string)FrameworkElement.SetAttachedProperty<T>(string, string, T)FrameworkElement.SetFocus()FrameworkElement.ValidateMouseLocationIfNeeded(Point)FrameworkElement.GetStringPresentation()FrameworkElement.ToRealObject()FrameworkElement.FromRealObject(object)FrameworkElement.ValidateType(Type, string)FrameworkElement.GetKnownControlTypes(TechnologyType)FrameworkElement.RegisterElement(Type, string)FrameworkElement.InitKnownWpfControlTypes()FrameworkElement.InitKnownSilverlightControlTypes()FrameworkElement.InitKnownXamlControlTypes(Type)FrameworkElement.GetControlTypeFromInterface(Type)FrameworkElement.Match(IFindExpression)FrameworkElement.SetDepth(int)FrameworkElement.AddChildNode(ITargetElement)FrameworkElement.SetClosingTag(ITargetElement)FrameworkElement.GetChildren()FrameworkElement.GetParent()FrameworkElement.GetHostParent()FrameworkElement.SetParent(ITargetElement)FrameworkElement.GetUniqueHashCode()FrameworkElement.ToString()FrameworkElement.Capture()FrameworkElement.CaptureImage()FrameworkElement.GetProperty<T>(string)FrameworkElement.GetPropertyTypeSafe(string)FrameworkElement.GetAutomationProperty(string)FrameworkElement.SetProperty(string, object)FrameworkElement.ActualWidthFrameworkElement.ActualHeightFrameworkElement.WidthFrameworkElement.HeightFrameworkElement.MinWidthFrameworkElement.MaxWidthFrameworkElement.MinHeightFrameworkElement.MaxHeightFrameworkElement.HorizontalAlignmentFrameworkElement.VerticalAlignmentFrameworkElement.MarginFrameworkElement.DesiredSizeFrameworkElement.RenderSizeFrameworkElement.NameFrameworkElement.OpacityFrameworkElement.ClipFrameworkElement.RenderTransformFrameworkElement.OpacityMaskFrameworkElement.RenderTransformOriginFrameworkElement.IsHitTestVisibleFrameworkElement.VisibilityFrameworkElement.UidFrameworkElement.MappingsFrameworkElement.AutomationIdFrameworkElement.XamlTagBaseFrameworkElement.TextBlockContentFrameworkElement.TextLiteralContentFrameworkElement.UserFrameworkElement.XamlTagFrameworkElement.WaitFrameworkElement.FindFrameworkElement.ApplicationFrameworkElement.AbsoluteTagIndexFrameworkElement.TagNameIndexFrameworkElement.AbsoluteSiblingTagIndexFrameworkElement.EnableValidateMouseLocationFrameworkElement.ToolTipTextFrameworkElement.ComputedVisibilityFrameworkElement.IsVisibleFrameworkElement.ChildrenFrameworkElement.TechnologyTypeFrameworkElement.DepthFrameworkElement.IsTestRegionFrameworkElement.ParsedElementFrameworkElement.HostAutomationObject<FrameworkElement>.GetProperty(AutomationProperty)AutomationObject<FrameworkElement>.GetProperty(AutomationProperty, object)AutomationObject<FrameworkElement>.SetProperty(AutomationProperty, object)AutomationObject<FrameworkElement>.InvokeMethod(AutomationMethod, params object[])AutomationObject<FrameworkElement>.InvokeMethod(string, params object[])AutomationObject<FrameworkElement>.Serialize()AutomationObject<FrameworkElement>.Deserialize(string)AutomationObject<FrameworkElement>.ReferenceAutomationObject<FrameworkElement>.PropertyBag

Constructors

TextBox()

Declaration

cs-api-definition
public TextBox()

Fields

AcceptsReturnProperty

Declaration

cs-api-definition
public static AutomationProperty AcceptsReturnProperty

Field Value

AutomationProperty

CaretBrushProperty

Declaration

cs-api-definition
public static AutomationProperty CaretBrushProperty

Field Value

AutomationProperty

InputScopeProperty

Declaration

cs-api-definition
public static AutomationProperty InputScopeProperty

Field Value

AutomationProperty

IsReadOnlyProperty

Declaration

cs-api-definition
public static AutomationProperty IsReadOnlyProperty

Field Value

AutomationProperty

MaxLengthProperty

Declaration

cs-api-definition
public static AutomationProperty MaxLengthProperty

Field Value

AutomationProperty

SelectionBackgroundProperty

Declaration

cs-api-definition
public static AutomationProperty SelectionBackgroundProperty

Field Value

AutomationProperty

SelectionForegroundProperty

Declaration

cs-api-definition
public static AutomationProperty SelectionForegroundProperty

Field Value

AutomationProperty

TextAlignmentProperty

Declaration

cs-api-definition
public static AutomationProperty TextAlignmentProperty

Field Value

AutomationProperty

TextProperty

Declaration

cs-api-definition
public static AutomationProperty TextProperty

Field Value

AutomationProperty

TextWrappingProperty

Declaration

cs-api-definition
public static AutomationProperty TextWrappingProperty

Field Value

AutomationProperty

Properties

AcceptsReturn

Declaration

cs-api-definition
public bool AcceptsReturn { get; set; }

Property Value

bool

CaretBrush

Declaration

cs-api-definition
public Brush CaretBrush { get; set; }

Property Value

Brush

InputScope

Declaration

cs-api-definition
public InputScope InputScope { get; set; }

Property Value

InputScope

IsReadOnly

Declaration

cs-api-definition
public bool IsReadOnly { get; set; }

Property Value

bool

MaxLength

Declaration

cs-api-definition
public int MaxLength { get; set; }

Property Value

int

SelectionBackground

Declaration

cs-api-definition
public Brush SelectionBackground { get; set; }

Property Value

Brush

SelectionForeground

Declaration

cs-api-definition
public Brush SelectionForeground { get; set; }

Property Value

Brush

Text

Get/set the text of the TextBox via automation property.

Declaration

cs-api-definition
public string Text { get; set; }

Property Value

string

Implements ITextBox.TextIFrameworkElement.Text

TextAlignment

Declaration

cs-api-definition
public TextAlignment TextAlignment { get; set; }

Property Value

TextAlignment

TextWrapping

Declaration

cs-api-definition
public TextWrapping TextWrapping { get; set; }

Property Value

TextWrapping

Methods

GetRealType()

Gets the real object type. This property returns string.empty on FrameworkElement and all subclasses that inherit from it.

Declaration

cs-api-definition
public override string GetRealType()

Returns

string

Overrides Control.GetRealType()

SetText(bool, string, int, int, bool, bool)

Sets or types a new text into the TextBox.

Declaration

cs-api-definition
public void SetText(bool simulateRealUser, string text, int keyPressTime, int keyHoldTime, bool fireKeyEvents, bool clearCurrentText = true)

Parameters

simulateRealUser

bool

If true, simulates typing, otherwise simply replaces the text.

text

string

The text to set/type.

keyPressTime

int

The delay between each press

keyHoldTime

int

The delay between pressing and releasing each key

fireKeyEvents

bool

If true fires KeyDown and KeyUp events during simulated typing. Not compatible with Unicode text input.

clearCurrentText

bool

If true clears text before simulated typing.

Implements ITextBox.SetText(bool, string, int, int, bool, bool)