Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
1723 lines (1573 sloc) 107 KB
<Type Name="TextBox" FullName="System.Windows.Controls.TextBox">
<TypeSignature Language="C#" Value="public class TextBox : System.Windows.Controls.Primitives.TextBoxBase, System.Windows.Markup.IAddChild" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi TextBox extends System.Windows.Controls.Primitives.TextBoxBase implements class System.Windows.Markup.IAddChild" />
<TypeSignature Language="DocId" Value="T:System.Windows.Controls.TextBox" />
<TypeSignature Language="VB.NET" Value="Public Class TextBox&#xA;Inherits TextBoxBase&#xA;Implements IAddChild" />
<TypeSignature Language="C++ CLI" Value="public ref class TextBox : System::Windows::Controls::Primitives::TextBoxBase, System::Windows::Markup::IAddChild" />
<TypeSignature Language="F#" Value="type TextBox = class&#xA; inherit TextBoxBase&#xA; interface IAddChild" />
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Windows.Controls.Primitives.TextBoxBase</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>System.Windows.Markup.IAddChild</InterfaceName>
</Interface>
</Interfaces>
<Attributes>
<Attribute>
<AttributeName>System.Windows.Localizability(System.Windows.LocalizationCategory.Text)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Windows.Markup.ContentProperty("Text")</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Represents a control that can be used to display or edit unformatted text.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
A <xref:System.Windows.Controls.TextBox> control can contain only unformatted text in its <xref:System.Windows.Controls.TextBox.Text%2A> property. The following graphic shows an example of a <xref:System.Windows.Controls.TextBox>.
![TextBox screen shot](~/add/media/ss-ctl-textbox.gif "TextBox screen shot")
Example of a TextBox
<xref:System.Windows.Controls.TextBox> is a composite control that is composed of several encapsulated components. Consequently, some events do not bubble up to the containing control because they are handled by encapsulated child elements. Because of this, application developers should listen for the tunneling version of an event (denoted by the prefix "Preview").
<xref:System.Windows.Controls.TextBox> supports unformatted text only. For applications that require support for richer content, see <xref:System.Windows.Controls.RichTextBox>. For applications that need to accept passwords or other sensitive input, see <xref:System.Windows.Controls.PasswordBox>.
Horizontally and vertically aligning text within a <xref:System.Windows.Controls.TextBox> is done with the <xref:System.Windows.Controls.Control.HorizontalContentAlignment%2A> and <xref:System.Windows.Controls.Control.VerticalContentAlignment%2A> properties. Aligning the <xref:System.Windows.Controls.TextBox> within the layout of the page is done with the <xref:System.Windows.FrameworkElement.HorizontalAlignment%2A> and <xref:System.Windows.FrameworkElement.VerticalAlignment%2A> properties.
The best way to hide the border around a <xref:System.Windows.Controls.TextBox> is to set the <xref:System.Windows.Controls.Control.BorderThickness%2A> property of the <xref:System.Windows.Controls.TextBox> to `0`.
> [!IMPORTANT]
> <xref:System.Windows.Controls.TextBox> has built-in handling for the bubbling <xref:System.Windows.UIElement.MouseUp> and <xref:System.Windows.UIElement.MouseDown> events. Consequently, custom event handlers that listen for <xref:System.Windows.UIElement.MouseUp> or <xref:System.Windows.UIElement.MouseDown> events from a <xref:System.Windows.Controls.TextBox> will not be called. If you need to respond to these events, listen for the tunneling <xref:System.Windows.UIElement.PreviewMouseUp> and <xref:System.Windows.UIElement.PreviewMouseDown> events instead, or register the handlers with the <xref:System.Windows.EventSetter.HandledEventsToo%2A> argument (this latter option is only available through code). Do not mark the event handled unless you deliberately want to disable <xref:System.Windows.Controls.TextBox> native handling of these events, and be aware that this has notable effects on the control's [!INCLUDE[TLA2#tla_ui](~/includes/tla2sharptla-ui-md.md)].
Scrollbars are not visible on a <xref:System.Windows.Controls.TextBox> by default. To make scrollbars visible, set the <xref:System.Windows.Controls.Primitives.TextBoxBase.VerticalScrollBarVisibility%2A> and <xref:System.Windows.Controls.Primitives.TextBoxBase.HorizontalScrollBarVisibility%2A> properties to <xref:System.Windows.Controls.ScrollBarVisibility.Visible> or <xref:System.Windows.Controls.ScrollBarVisibility.Auto>.
Usually the <xref:System.Windows.Controls.Primitives.TextBoxBase.TextChanged> event should be used to detect whenever the text in a <xref:System.Windows.Controls.TextBox> or <xref:System.Windows.Controls.RichTextBox> changes rather then <xref:System.Windows.UIElement.KeyDown> as you might expect. See [How to: Detect When Text in a TextBox Has Changed](~/docs/framework/wpf/controls/how-to-detect-when-text-in-a-textbox-has-changed.md) for an example.
## Customizing the TextBox Control
To apply the same property settings to multiple <xref:System.Windows.Controls.TextBox> controls, use the <xref:System.Windows.FrameworkElement.Style%2A> property. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information about creating a <xref:System.Windows.Controls.ControlTemplate>, see [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](~/docs/framework/wpf/controls/customizing-the-appearance-of-an-existing-control.md). To see the parts and states that are specific to the <xref:System.Windows.Controls.TextBox>, see [TextBox Styles and Templates](~/docs/framework/wpf/controls/textbox-styles-and-templates.md).
Dependency properties for this control might be set by the control's default style. If a property is set by a default style, the property might change from its default value when the control appears in the application. The default style is determined by which desktop theme is used when the application is running. For more information, see [Default WPF Themes](https://go.microsoft.com/fwlink/?LinkID=158252).
[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)]
## Examples
This example shows how to use the Text property to set the initial text contents of a TextBox control.
> [!NOTE]
> Although the Extensible Application Markup Language (XAML) version of the example could use the \<TextBox.Text> tags around the text of each button's TextBox content, it is not necessary because the TextBox applies the ContentPropertyAttribute attribute to the Text property.
```xaml
<TextBox Name="tbSettingText">
Initial text contents of the TextBox.
</TextBox>
```
```csharp
tbSettingText.Text = "Initial text contents of the TextBox.";
```
```vb
tbSettingText.Text = "Initial text contents of the TextBox."
```
For additional examples, see the 4.0 version of this document: [TextBox Class](https://msdn.microsoft.com/library/ms617604\(v=vs.100\).aspx).
]]></format>
</remarks>
<altmember cref="T:System.Windows.Controls.PasswordBox" />
<altmember cref="T:System.Windows.Controls.RichTextBox" />
<related type="ExternalDocumentation" href="https://msdn.microsoft.com/library/aa969815(v=vs.100).aspx">TextBox Overview</related>
<related type="ExternalDocumentation" href="https://go.microsoft.com/fwlink/?LinkID=160053">WPF Controls Gallery Sample</related>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public TextBox ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Controls.TextBox.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; TextBox();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Windows.Controls.TextBox" /> class.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="CaretIndex">
<MemberSignature Language="C#" Value="public int CaretIndex { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 CaretIndex" />
<MemberSignature Language="DocId" Value="P:System.Windows.Controls.TextBox.CaretIndex" />
<MemberSignature Language="VB.NET" Value="Public Property CaretIndex As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property int CaretIndex { int get(); void set(int value); };" />
<MemberSignature Language="F#" Value="member this.CaretIndex : int with get, set" Usage="System.Windows.Controls.TextBox.CaretIndex" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the insertion position index of the caret.</summary>
<value>The zero-based insertion position index of the caret.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Getting this property returns the current insertion position index of the caret (see <xref:System.Windows.Documents.TextPointer> for information on terminology like "insertion position"). Setting this property moves the caret to the specified insertion position.
An insertion position is between either characters or element tags.
]]></format>
</remarks>
<altmember cref="T:System.Windows.Documents.TextPointer" />
</Docs>
</Member>
<Member MemberName="CharacterCasing">
<MemberSignature Language="C#" Value="public System.Windows.Controls.CharacterCasing CharacterCasing { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Windows.Controls.CharacterCasing CharacterCasing" />
<MemberSignature Language="DocId" Value="P:System.Windows.Controls.TextBox.CharacterCasing" />
<MemberSignature Language="VB.NET" Value="Public Property CharacterCasing As CharacterCasing" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Windows::Controls::CharacterCasing CharacterCasing { System::Windows::Controls::CharacterCasing get(); void set(System::Windows::Controls::CharacterCasing value); };" />
<MemberSignature Language="F#" Value="member this.CharacterCasing : System.Windows.Controls.CharacterCasing with get, set" Usage="System.Windows.Controls.TextBox.CharacterCasing" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Controls.CharacterCasing</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets how characters are cased when they are manually entered into the text box.</summary>
<value>One of the <see cref="T:System.Windows.Controls.CharacterCasing" /> values that specifies how manually entered characters are cased. The default is <see cref="F:System.Windows.Controls.CharacterCasing.Normal" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This property does not affect characters that are added programmatically.
<a name="dependencyPropertyInfo_CharacterCasing"></a>
## Dependency Property Information
|||
|-|-|
|Identifier field|<xref:System.Windows.Controls.TextBox.CharacterCasingProperty>|
|Metadata properties set to `true`|None|
## Examples
The following example shows how to use the <xref:System.Windows.Controls.TextBox.CharacterCasing%2A> property to convert all manually entered characters to uppercase in a text box.
[!code-xaml[TextBoxMiscSnippets_snip#CharacterCasingExampleWholePage](~/samples/snippets/csharp/VS_Snippets_Wpf/TextBoxMiscSnippets_snip/csharp/charactercasingexample.xaml#charactercasingexamplewholepage)]
[!code-csharp[TextBoxMiscSnippets_procedural_snip#CharacterCasingCodeExampleWholePage](~/samples/snippets/csharp/VS_Snippets_Wpf/TextBoxMiscSnippets_procedural_snip/CSharp/CharacterCasingExample.cs#charactercasingcodeexamplewholepage)]
[!code-vb[TextBoxMiscSnippets_procedural_snip#CharacterCasingCodeExampleWholePage](~/samples/snippets/visualbasic/VS_Snippets_Wpf/TextBoxMiscSnippets_procedural_snip/visualbasic/charactercasingexample.vb#charactercasingcodeexamplewholepage)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="CharacterCasingProperty">
<MemberSignature Language="C#" Value="public static readonly System.Windows.DependencyProperty CharacterCasingProperty;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly class System.Windows.DependencyProperty CharacterCasingProperty" />
<MemberSignature Language="DocId" Value="F:System.Windows.Controls.TextBox.CharacterCasingProperty" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly CharacterCasingProperty As DependencyProperty " />
<MemberSignature Language="C++ CLI" Value="public: static initonly System::Windows::DependencyProperty ^ CharacterCasingProperty;" />
<MemberSignature Language="F#" Value=" staticval mutable CharacterCasingProperty : System.Windows.DependencyProperty" Usage="System.Windows.Controls.TextBox.CharacterCasingProperty" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.DependencyProperty</ReturnType>
</ReturnValue>
<Docs>
<summary>Identifies the <see cref="P:System.Windows.Controls.TextBox.CharacterCasing" /> dependency property.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Clear">
<MemberSignature Language="C#" Value="public void Clear ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Clear() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Controls.TextBox.Clear" />
<MemberSignature Language="VB.NET" Value="Public Sub Clear ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void Clear();" />
<MemberSignature Language="F#" Value="member this.Clear : unit -&gt; unit" Usage="textBox.Clear " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Clears all the content from the text box.</summary>
<remarks>To be added.</remarks>
<altmember cref="P:System.Windows.Controls.TextBox.Text" />
</Docs>
</Member>
<Member MemberName="GetCharacterIndexFromLineIndex">
<MemberSignature Language="C#" Value="public int GetCharacterIndexFromLineIndex (int lineIndex);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance int32 GetCharacterIndexFromLineIndex(int32 lineIndex) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Controls.TextBox.GetCharacterIndexFromLineIndex(System.Int32)" />
<MemberSignature Language="VB.NET" Value="Public Function GetCharacterIndexFromLineIndex (lineIndex As Integer) As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; int GetCharacterIndexFromLineIndex(int lineIndex);" />
<MemberSignature Language="F#" Value="member this.GetCharacterIndexFromLineIndex : int -&gt; int" Usage="textBox.GetCharacterIndexFromLineIndex lineIndex" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="lineIndex" Type="System.Int32" />
</Parameters>
<Docs>
<param name="lineIndex">The zero-based index of the line to retrieve the initial character index for.</param>
<summary>Returns the zero-based character index for the first character in the specified line.</summary>
<returns>The zero-based index for the first character in the specified line.</returns>
<remarks>To be added.</remarks>
<altmember cref="P:System.Windows.Controls.TextBox.LineCount" />
<altmember cref="M:System.Windows.Controls.TextBox.GetCharacterIndexFromPoint(System.Windows.Point,System.Boolean)" />
<altmember cref="M:System.Windows.Controls.TextBox.GetLineIndexFromCharacterIndex(System.Int32)" />
<altmember cref="Overload:System.Windows.Controls.TextBox.GetRectFromCharacterIndex" />
<altmember cref="M:System.Windows.Controls.TextBox.GetFirstVisibleLineIndex" />
<altmember cref="M:System.Windows.Controls.TextBox.GetLastVisibleLineIndex" />
</Docs>
</Member>
<Member MemberName="GetCharacterIndexFromPoint">
<MemberSignature Language="C#" Value="public int GetCharacterIndexFromPoint (System.Windows.Point point, bool snapToText);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance int32 GetCharacterIndexFromPoint(valuetype System.Windows.Point point, bool snapToText) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Controls.TextBox.GetCharacterIndexFromPoint(System.Windows.Point,System.Boolean)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; int GetCharacterIndexFromPoint(System::Windows::Point point, bool snapToText);" />
<MemberSignature Language="F#" Value="member this.GetCharacterIndexFromPoint : System.Windows.Point * bool -&gt; int" Usage="textBox.GetCharacterIndexFromPoint (point, snapToText)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="point" Type="System.Windows.Point" />
<Parameter Name="snapToText" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="point">A point in <see cref="T:System.Windows.Controls.TextBox" /> coordinate-space for which to return an index.</param>
<param name="snapToText">
<see langword="true" /> to return the nearest index if there is no character at the specified point; <see langword="false" /> to return -1 if there is no character at the specified point.</param>
<summary>Returns the zero-based index of the character that is closest to the specified point.</summary>
<returns>The index of the character that is closest to the specified point, or -1 if no valid index can be found.</returns>
<remarks>To be added.</remarks>
<altmember cref="M:System.Windows.Controls.TextBox.GetCharacterIndexFromLineIndex(System.Int32)" />
<altmember cref="M:System.Windows.Controls.TextBox.GetLineIndexFromCharacterIndex(System.Int32)" />
<altmember cref="Overload:System.Windows.Controls.TextBox.GetRectFromCharacterIndex" />
<altmember cref="M:System.Windows.Controls.TextBox.GetFirstVisibleLineIndex" />
<altmember cref="M:System.Windows.Controls.TextBox.GetLastVisibleLineIndex" />
</Docs>
</Member>
<Member MemberName="GetFirstVisibleLineIndex">
<MemberSignature Language="C#" Value="public int GetFirstVisibleLineIndex ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance int32 GetFirstVisibleLineIndex() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Controls.TextBox.GetFirstVisibleLineIndex" />
<MemberSignature Language="VB.NET" Value="Public Function GetFirstVisibleLineIndex () As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; int GetFirstVisibleLineIndex();" />
<MemberSignature Language="F#" Value="member this.GetFirstVisibleLineIndex : unit -&gt; int" Usage="textBox.GetFirstVisibleLineIndex " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Returns the line index for the first line that is currently visible in the text box.</summary>
<returns>The zero-based index for the first visible line in the text box.</returns>
<remarks>To be added.</remarks>
<altmember cref="M:System.Windows.Controls.TextBox.GetCharacterIndexFromPoint(System.Windows.Point,System.Boolean)" />
<altmember cref="M:System.Windows.Controls.TextBox.GetCharacterIndexFromLineIndex(System.Int32)" />
<altmember cref="M:System.Windows.Controls.TextBox.GetLineIndexFromCharacterIndex(System.Int32)" />
<altmember cref="Overload:System.Windows.Controls.TextBox.GetRectFromCharacterIndex" />
<altmember cref="M:System.Windows.Controls.TextBox.GetLastVisibleLineIndex" />
</Docs>
</Member>
<Member MemberName="GetLastVisibleLineIndex">
<MemberSignature Language="C#" Value="public int GetLastVisibleLineIndex ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance int32 GetLastVisibleLineIndex() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Controls.TextBox.GetLastVisibleLineIndex" />
<MemberSignature Language="VB.NET" Value="Public Function GetLastVisibleLineIndex () As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; int GetLastVisibleLineIndex();" />
<MemberSignature Language="F#" Value="member this.GetLastVisibleLineIndex : unit -&gt; int" Usage="textBox.GetLastVisibleLineIndex " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Returns the line index for the last line that is currently visible in the text box.</summary>
<returns>The zero-based index for the last visible line in the text box.</returns>
<remarks>To be added.</remarks>
<altmember cref="M:System.Windows.Controls.TextBox.GetCharacterIndexFromPoint(System.Windows.Point,System.Boolean)" />
<altmember cref="M:System.Windows.Controls.TextBox.GetLineIndexFromCharacterIndex(System.Int32)" />
<altmember cref="Overload:System.Windows.Controls.TextBox.GetRectFromCharacterIndex" />
<altmember cref="M:System.Windows.Controls.TextBox.GetCharacterIndexFromLineIndex(System.Int32)" />
<altmember cref="M:System.Windows.Controls.TextBox.GetFirstVisibleLineIndex" />
</Docs>
</Member>
<Member MemberName="GetLineIndexFromCharacterIndex">
<MemberSignature Language="C#" Value="public int GetLineIndexFromCharacterIndex (int charIndex);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance int32 GetLineIndexFromCharacterIndex(int32 charIndex) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Controls.TextBox.GetLineIndexFromCharacterIndex(System.Int32)" />
<MemberSignature Language="VB.NET" Value="Public Function GetLineIndexFromCharacterIndex (charIndex As Integer) As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; int GetLineIndexFromCharacterIndex(int charIndex);" />
<MemberSignature Language="F#" Value="member this.GetLineIndexFromCharacterIndex : int -&gt; int" Usage="textBox.GetLineIndexFromCharacterIndex charIndex" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="charIndex" Type="System.Int32" />
</Parameters>
<Docs>
<param name="charIndex">The zero-based character index for which to retrieve the associated line index.</param>
<summary>Returns the zero-based line index for the line that contains the specified character index.</summary>
<returns>The zero-based index for the line that contains the specified character index.</returns>
<remarks>To be added.</remarks>
<altmember cref="M:System.Windows.Controls.TextBox.GetCharacterIndexFromPoint(System.Windows.Point,System.Boolean)" />
<altmember cref="M:System.Windows.Controls.TextBox.GetCharacterIndexFromLineIndex(System.Int32)" />
<altmember cref="Overload:System.Windows.Controls.TextBox.GetRectFromCharacterIndex" />
<altmember cref="M:System.Windows.Controls.TextBox.GetFirstVisibleLineIndex" />
<altmember cref="M:System.Windows.Controls.TextBox.GetLastVisibleLineIndex" />
</Docs>
</Member>
<Member MemberName="GetLineLength">
<MemberSignature Language="C#" Value="public int GetLineLength (int lineIndex);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance int32 GetLineLength(int32 lineIndex) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Controls.TextBox.GetLineLength(System.Int32)" />
<MemberSignature Language="VB.NET" Value="Public Function GetLineLength (lineIndex As Integer) As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; int GetLineLength(int lineIndex);" />
<MemberSignature Language="F#" Value="member this.GetLineLength : int -&gt; int" Usage="textBox.GetLineLength lineIndex" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="lineIndex" Type="System.Int32" />
</Parameters>
<Docs>
<param name="lineIndex">The zero-based line index for which to return a character count.</param>
<summary>Returns the number of characters in the specified line.</summary>
<returns>The number of characters in the specified line.</returns>
<remarks>To be added.</remarks>
<altmember cref="P:System.Windows.Controls.TextBox.LineCount" />
<altmember cref="M:System.Windows.Controls.TextBox.GetFirstVisibleLineIndex" />
<altmember cref="M:System.Windows.Controls.TextBox.GetLastVisibleLineIndex" />
</Docs>
</Member>
<Member MemberName="GetLineText">
<MemberSignature Language="C#" Value="public string GetLineText (int lineIndex);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance string GetLineText(int32 lineIndex) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Controls.TextBox.GetLineText(System.Int32)" />
<MemberSignature Language="VB.NET" Value="Public Function GetLineText (lineIndex As Integer) As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::String ^ GetLineText(int lineIndex);" />
<MemberSignature Language="F#" Value="member this.GetLineText : int -&gt; string" Usage="textBox.GetLineText lineIndex" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="lineIndex" Type="System.Int32" />
</Parameters>
<Docs>
<param name="lineIndex">The zero-based line index for which to retrieve the currently displayed text.</param>
<summary>Returns the text that is currently displayed on the specified line.</summary>
<returns>A string containing a copy of the text currently visible on the specified line.</returns>
<remarks>To be added.</remarks>
<altmember cref="P:System.Windows.Controls.TextBox.LineCount" />
<altmember cref="M:System.Windows.Controls.TextBox.GetFirstVisibleLineIndex" />
<altmember cref="M:System.Windows.Controls.TextBox.GetLastVisibleLineIndex" />
</Docs>
</Member>
<Member MemberName="GetNextSpellingErrorCharacterIndex">
<MemberSignature Language="C#" Value="public int GetNextSpellingErrorCharacterIndex (int charIndex, System.Windows.Documents.LogicalDirection direction);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance int32 GetNextSpellingErrorCharacterIndex(int32 charIndex, valuetype System.Windows.Documents.LogicalDirection direction) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Controls.TextBox.GetNextSpellingErrorCharacterIndex(System.Int32,System.Windows.Documents.LogicalDirection)" />
<MemberSignature Language="VB.NET" Value="Public Function GetNextSpellingErrorCharacterIndex (charIndex As Integer, direction As LogicalDirection) As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; int GetNextSpellingErrorCharacterIndex(int charIndex, System::Windows::Documents::LogicalDirection direction);" />
<MemberSignature Language="F#" Value="member this.GetNextSpellingErrorCharacterIndex : int * System.Windows.Documents.LogicalDirection -&gt; int" Usage="textBox.GetNextSpellingErrorCharacterIndex (charIndex, direction)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="charIndex" Type="System.Int32" />
<Parameter Name="direction" Type="System.Windows.Documents.LogicalDirection" />
</Parameters>
<Docs>
<param name="charIndex">The zero-based character index indicating a position from which to search for the next spelling error.</param>
<param name="direction">One of the <see cref="T:System.Windows.Documents.LogicalDirection" /> values that specifies the direction in which to search for the next spelling error, starting at the specified <paramref name="charIndex" />.</param>
<summary>Returns the beginning character index for the next spelling error in the contents of the text box.</summary>
<returns>The character index for the beginning of the next spelling error in the contents of the text box, or -1 if no next spelling error exists.</returns>
<remarks>To be added.</remarks>
<altmember cref="M:System.Windows.Controls.TextBox.GetSpellingError(System.Int32)" />
<altmember cref="M:System.Windows.Controls.TextBox.GetSpellingErrorLength(System.Int32)" />
<altmember cref="M:System.Windows.Controls.TextBox.GetSpellingErrorStart(System.Int32)" />
</Docs>
</Member>
<MemberGroup MemberName="GetRectFromCharacterIndex">
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Returns the rectangle for an edge of the character at the specified index.</summary>
</Docs>
</MemberGroup>
<Member MemberName="GetRectFromCharacterIndex">
<MemberSignature Language="C#" Value="public System.Windows.Rect GetRectFromCharacterIndex (int charIndex);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance valuetype System.Windows.Rect GetRectFromCharacterIndex(int32 charIndex) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Controls.TextBox.GetRectFromCharacterIndex(System.Int32)" />
<MemberSignature Language="VB.NET" Value="Public Function GetRectFromCharacterIndex (charIndex As Integer) As Rect" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::Windows::Rect GetRectFromCharacterIndex(int charIndex);" />
<MemberSignature Language="F#" Value="member this.GetRectFromCharacterIndex : int -&gt; System.Windows.Rect" Usage="textBox.GetRectFromCharacterIndex charIndex" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Windows.Rect</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="charIndex" Type="System.Int32" />
</Parameters>
<Docs>
<param name="charIndex">The zero-based character index of the character for which to retrieve the rectangle.</param>
<summary>Returns the rectangle for the leading edge of the character at the specified index.</summary>
<returns>A rectangle for the leading edge of the character at the specified character index, or <see cref="P:System.Windows.Rect.Empty" /> if a bounding rectangle cannot be determined.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Because this method returns a rectangle that represents an edge of the character, the width of the rectangle is 0.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="GetRectFromCharacterIndex">
<MemberSignature Language="C#" Value="public System.Windows.Rect GetRectFromCharacterIndex (int charIndex, bool trailingEdge);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance valuetype System.Windows.Rect GetRectFromCharacterIndex(int32 charIndex, bool trailingEdge) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Controls.TextBox.GetRectFromCharacterIndex(System.Int32,System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Public Function GetRectFromCharacterIndex (charIndex As Integer, trailingEdge As Boolean) As Rect" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::Windows::Rect GetRectFromCharacterIndex(int charIndex, bool trailingEdge);" />
<MemberSignature Language="F#" Value="member this.GetRectFromCharacterIndex : int * bool -&gt; System.Windows.Rect" Usage="textBox.GetRectFromCharacterIndex (charIndex, trailingEdge)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Rect</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="charIndex" Type="System.Int32" />
<Parameter Name="trailingEdge" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="charIndex">The zero-based character index of the character for which to retrieve the rectangle.</param>
<param name="trailingEdge">
<see langword="true" /> to get the trailing edge of the character; <see langword="false" /> to get the leading edge of the character.</param>
<summary>Returns the rectangle for the leading or trailing edge of the character at the specified index.</summary>
<returns>A rectangle for an edge of the character at the specified character index, or <see cref="P:System.Windows.Rect.Empty" /> if a bounding rectangle cannot be determined.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Because this method returns a rectangle that represents an edge of the character, the width of the rectangle is 0.
]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">
<paramref name="charIndex" /> is negative or is greater than the length of the content.</exception>
</Docs>
</Member>
<Member MemberName="GetSpellingError">
<MemberSignature Language="C#" Value="public System.Windows.Controls.SpellingError GetSpellingError (int charIndex);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.Windows.Controls.SpellingError GetSpellingError(int32 charIndex) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Controls.TextBox.GetSpellingError(System.Int32)" />
<MemberSignature Language="VB.NET" Value="Public Function GetSpellingError (charIndex As Integer) As SpellingError" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::Windows::Controls::SpellingError ^ GetSpellingError(int charIndex);" />
<MemberSignature Language="F#" Value="member this.GetSpellingError : int -&gt; System.Windows.Controls.SpellingError" Usage="textBox.GetSpellingError charIndex" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Controls.SpellingError</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="charIndex" Type="System.Int32" />
</Parameters>
<Docs>
<param name="charIndex">The zero-based character index of a position in content to examine for a spelling error.</param>
<summary>Returns a <see cref="T:System.Windows.Controls.SpellingError" /> object associated with any spelling error at the specified character index.</summary>
<returns>A <see cref="T:System.Windows.Controls.SpellingError" /> object containing the details of the spelling error found at the character indicated by <paramref name="charIndex" />, or <see langword="null" /> if no spelling error exists at the specified character.</returns>
<remarks>To be added.</remarks>
<altmember cref="M:System.Windows.Controls.TextBox.GetNextSpellingErrorCharacterIndex(System.Int32,System.Windows.Documents.LogicalDirection)" />
<altmember cref="M:System.Windows.Controls.TextBox.GetSpellingErrorLength(System.Int32)" />
<altmember cref="M:System.Windows.Controls.TextBox.GetSpellingErrorStart(System.Int32)" />
</Docs>
</Member>
<Member MemberName="GetSpellingErrorLength">
<MemberSignature Language="C#" Value="public int GetSpellingErrorLength (int charIndex);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance int32 GetSpellingErrorLength(int32 charIndex) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Controls.TextBox.GetSpellingErrorLength(System.Int32)" />
<MemberSignature Language="VB.NET" Value="Public Function GetSpellingErrorLength (charIndex As Integer) As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; int GetSpellingErrorLength(int charIndex);" />
<MemberSignature Language="F#" Value="member this.GetSpellingErrorLength : int -&gt; int" Usage="textBox.GetSpellingErrorLength charIndex" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="charIndex" Type="System.Int32" />
</Parameters>
<Docs>
<param name="charIndex">The zero-based character index of a position in content to examine for a spelling error.</param>
<summary>Returns the length of any spelling error that includes the specified character.</summary>
<returns>The length of any spelling error that includes the character specified by charIndex, or 0 if the specified character is not part of a spelling error.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="GetSpellingErrorStart">
<MemberSignature Language="C#" Value="public int GetSpellingErrorStart (int charIndex);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance int32 GetSpellingErrorStart(int32 charIndex) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Controls.TextBox.GetSpellingErrorStart(System.Int32)" />
<MemberSignature Language="VB.NET" Value="Public Function GetSpellingErrorStart (charIndex As Integer) As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; int GetSpellingErrorStart(int charIndex);" />
<MemberSignature Language="F#" Value="member this.GetSpellingErrorStart : int -&gt; int" Usage="textBox.GetSpellingErrorStart charIndex" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="charIndex" Type="System.Int32" />
</Parameters>
<Docs>
<param name="charIndex">The zero-based character index of a position in content to examine for a spelling error.</param>
<summary>Returns the beginning character index for any spelling error that includes the specified character.</summary>
<returns>The beginning character index for any spelling error that includes the character specified by <paramref name="charIndex" />, or -1 if the specified character is not part of a spelling error.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="LineCount">
<MemberSignature Language="C#" Value="public int LineCount { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 LineCount" />
<MemberSignature Language="DocId" Value="P:System.Windows.Controls.TextBox.LineCount" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property LineCount As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property int LineCount { int get(); };" />
<MemberSignature Language="F#" Value="member this.LineCount : int" Usage="System.Windows.Controls.TextBox.LineCount" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the total number of lines in the text box.</summary>
<value>The total number of lines in the text box, or -1 if layout information is not available.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If text wrapping is enabled, changing the width of the text box may change this value.
The value returned is the total number of lines in the text box, regardless of how many are currently visible.
]]></format>
</remarks>
<altmember cref="P:System.Windows.Controls.TextBox.TextWrapping" />
<altmember cref="M:System.Windows.Controls.TextBox.GetCharacterIndexFromLineIndex(System.Int32)" />
<altmember cref="M:System.Windows.Controls.TextBox.GetFirstVisibleLineIndex" />
<altmember cref="M:System.Windows.Controls.TextBox.GetLastVisibleLineIndex" />
<altmember cref="M:System.Windows.Controls.TextBox.GetLineLength(System.Int32)" />
<altmember cref="M:System.Windows.Controls.TextBox.GetLineText(System.Int32)" />
<altmember cref="P:System.Windows.Controls.TextBox.MaxLines" />
<altmember cref="P:System.Windows.Controls.TextBox.MinLines" />
<altmember cref="M:System.Windows.Controls.TextBox.ScrollToLine(System.Int32)" />
</Docs>
</Member>
<Member MemberName="LogicalChildren">
<MemberSignature Language="C#" Value="protected internal override System.Collections.IEnumerator LogicalChildren { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Collections.IEnumerator LogicalChildren" />
<MemberSignature Language="DocId" Value="P:System.Windows.Controls.TextBox.LogicalChildren" />
<MemberSignature Language="VB.NET" Value="Protected Friend Overrides ReadOnly Property LogicalChildren As IEnumerator" />
<MemberSignature Language="C++ CLI" Value="protected public:&#xA; virtual property System::Collections::IEnumerator ^ LogicalChildren { System::Collections::IEnumerator ^ get(); };" />
<MemberSignature Language="F#" Value="member this.LogicalChildren : System.Collections.IEnumerator" Usage="System.Windows.Controls.TextBox.LogicalChildren" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.IEnumerator</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets an enumerator for the logical child elements of the <see cref="T:System.Windows.Controls.TextBox" />.</summary>
<value>An enumerator for the logical child elements of the <see cref="T:System.Windows.Controls.TextBox" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Controls.TextBox.LogicalChildren%2A> property returns an enumerator for a collection that contains a <xref:System.String> that is equal to the <xref:System.Windows.Controls.TextBox.Text%2A> property.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="MaxLength">
<MemberSignature Language="C#" Value="public int MaxLength { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 MaxLength" />
<MemberSignature Language="DocId" Value="P:System.Windows.Controls.TextBox.MaxLength" />
<MemberSignature Language="VB.NET" Value="Public Property MaxLength As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property int MaxLength { int get(); void set(int value); };" />
<MemberSignature Language="F#" Value="member this.MaxLength : int with get, set" Usage="System.Windows.Controls.TextBox.MaxLength" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(0)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Windows.Localizability(System.Windows.LocalizationCategory.None, Modifiability=System.Windows.Modifiability.Unmodifiable)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the maximum number of characters that can be manually entered into the text box.</summary>
<value>The maximum number of characters that can be manually entered into the text box. The default is 0, which indicates no limit.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
You can use this property to restrict the length of text entered in the control for values such as postal codes and telephone numbers. You can also use this property to restrict the length of text entered when the data is to be stored in a database so that the text entered into the control does not exceed the maximum length of the corresponding field in the database.
This property does not affect characters that are added programmatically.
When this property is set to 0, the maximum length of the text that can be entered in the control is limited only by available memory.
<a name="dependencyPropertyInfo_MaxLength"></a>
## Dependency Property Information
|||
|-|-|
|Identifier field|<xref:System.Windows.Controls.TextBox.MaxLengthProperty>|
|Metadata properties set to `true`|None|
## Examples
The following example shows how to create a <xref:System.Windows.Controls.TextBox> with a <xref:System.Windows.Controls.TextBox.MaxLength%2A> of 500 characters.
[!code-xaml[TextBoxMiscSnippets_snip#TextBoxExampleWholePage](~/samples/snippets/csharp/VS_Snippets_Wpf/TextBoxMiscSnippets_snip/csharp/textboxexample.xaml#textboxexamplewholepage)]
[!code-csharp[TextBoxMiscSnippets_procedural_snip#TextBoxCodeExampleInline1](~/samples/snippets/csharp/VS_Snippets_Wpf/TextBoxMiscSnippets_procedural_snip/CSharp/TextBoxExample.cs#textboxcodeexampleinline1)]
[!code-vb[TextBoxMiscSnippets_procedural_snip#TextBoxCodeExampleInline1](~/samples/snippets/visualbasic/VS_Snippets_Wpf/TextBoxMiscSnippets_procedural_snip/visualbasic/textboxexample.vb#textboxcodeexampleinline1)]
]]></format>
</remarks>
<altmember cref="P:System.Windows.Controls.TextBox.MaxLines" />
</Docs>
</Member>
<Member MemberName="MaxLengthProperty">
<MemberSignature Language="C#" Value="public static readonly System.Windows.DependencyProperty MaxLengthProperty;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly class System.Windows.DependencyProperty MaxLengthProperty" />
<MemberSignature Language="DocId" Value="F:System.Windows.Controls.TextBox.MaxLengthProperty" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly MaxLengthProperty As DependencyProperty " />
<MemberSignature Language="C++ CLI" Value="public: static initonly System::Windows::DependencyProperty ^ MaxLengthProperty;" />
<MemberSignature Language="F#" Value=" staticval mutable MaxLengthProperty : System.Windows.DependencyProperty" Usage="System.Windows.Controls.TextBox.MaxLengthProperty" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.DependencyProperty</ReturnType>
</ReturnValue>
<Docs>
<summary>Identifies the <see cref="P:System.Windows.Controls.TextBox.MaxLength" /> dependency property.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="MaxLines">
<MemberSignature Language="C#" Value="public int MaxLines { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 MaxLines" />
<MemberSignature Language="DocId" Value="P:System.Windows.Controls.TextBox.MaxLines" />
<MemberSignature Language="VB.NET" Value="Public Property MaxLines As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property int MaxLines { int get(); void set(int value); };" />
<MemberSignature Language="F#" Value="member this.MaxLines : int with get, set" Usage="System.Windows.Controls.TextBox.MaxLines" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(2147483647)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the maximum number of visible lines.</summary>
<value>The maximum number of visible lines. The default is <see cref="F:System.Int32.MaxValue" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Getting this property returns the current value of <xref:System.Windows.Controls.TextBox.MaxLines%2A>. Setting this property causes the text box to resize if the number of visible lines exceeds the limit specified by <xref:System.Windows.Controls.TextBox.MaxLines%2A>.
This property applies only to visible lines, and does not constrain the actual number of lines. Depending on its configuration, a text box may contain additional non-visible lines that are accessible by scrolling.
If the <xref:System.Windows.FrameworkElement.Height%2A> property is explicitly set on a <xref:System.Windows.Controls.TextBox>, the <xref:System.Windows.Controls.TextBox.MaxLines%2A> and <xref:System.Windows.Controls.TextBox.MinLines%2A> property values are ignored.
<a name="dependencyPropertyInfo_MaxLines"></a>
## Dependency Property Information
|||
|-|-|
|Identifier field|<xref:System.Windows.Controls.TextBox.MaxLinesProperty>|
|Metadata properties set to `true`|<xref:System.Windows.FrameworkPropertyMetadata.AffectsMeasure%2A>|
## Examples
The following example shows how to create a <xref:System.Windows.Controls.TextBox> with a <xref:System.Windows.Controls.TextBox.MaxLines%2A> value of 5.
[!code-xaml[TextBoxMiscSnippets_snip#TextBoxExampleWholePage](~/samples/snippets/csharp/VS_Snippets_Wpf/TextBoxMiscSnippets_snip/csharp/textboxexample.xaml#textboxexamplewholepage)]
[!code-csharp[TextBoxMiscSnippets_procedural_snip#TextBoxCodeExampleInline1](~/samples/snippets/csharp/VS_Snippets_Wpf/TextBoxMiscSnippets_procedural_snip/CSharp/TextBoxExample.cs#textboxcodeexampleinline1)]
[!code-vb[TextBoxMiscSnippets_procedural_snip#TextBoxCodeExampleInline1](~/samples/snippets/visualbasic/VS_Snippets_Wpf/TextBoxMiscSnippets_procedural_snip/visualbasic/textboxexample.vb#textboxcodeexampleinline1)]
]]></format>
</remarks>
<exception cref="T:System.Exception">
<see cref="P:System.Windows.Controls.TextBox.MaxLines" /> is less than <see cref="P:System.Windows.Controls.TextBox.MinLines" />.</exception>
<altmember cref="P:System.Windows.Controls.TextBox.MinLines" />
<altmember cref="P:System.Windows.Controls.TextBox.MaxLength" />
</Docs>
</Member>
<Member MemberName="MaxLinesProperty">
<MemberSignature Language="C#" Value="public static readonly System.Windows.DependencyProperty MaxLinesProperty;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly class System.Windows.DependencyProperty MaxLinesProperty" />
<MemberSignature Language="DocId" Value="F:System.Windows.Controls.TextBox.MaxLinesProperty" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly MaxLinesProperty As DependencyProperty " />
<MemberSignature Language="C++ CLI" Value="public: static initonly System::Windows::DependencyProperty ^ MaxLinesProperty;" />
<MemberSignature Language="F#" Value=" staticval mutable MaxLinesProperty : System.Windows.DependencyProperty" Usage="System.Windows.Controls.TextBox.MaxLinesProperty" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.DependencyProperty</ReturnType>
</ReturnValue>
<Docs>
<summary>Identifies the <see cref="P:System.Windows.Controls.TextBox.MaxLines" /> dependency property.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="MeasureOverride">
<MemberSignature Language="C#" Value="protected override System.Windows.Size MeasureOverride (System.Windows.Size constraint);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance valuetype System.Windows.Size MeasureOverride(valuetype System.Windows.Size constraint) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Controls.TextBox.MeasureOverride(System.Windows.Size)" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Function MeasureOverride (constraint As Size) As Size" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; override System::Windows::Size MeasureOverride(System::Windows::Size constraint);" />
<MemberSignature Language="F#" Value="override this.MeasureOverride : System.Windows.Size -&gt; System.Windows.Size" Usage="textBox.MeasureOverride constraint" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Size</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="constraint" Type="System.Windows.Size" />
</Parameters>
<Docs>
<param name="constraint">A <see cref="T:System.Windows.Size" /> structure that specifies the constraints on the size of the text box.</param>
<summary>Sizes the text box to its content.</summary>
<returns>A <see cref="T:System.Windows.Size" /> structure indicating the new size of the text box.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Override this method to implement custom sizing behavior.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="MinLines">
<MemberSignature Language="C#" Value="public int MinLines { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 MinLines" />
<MemberSignature Language="DocId" Value="P:System.Windows.Controls.TextBox.MinLines" />
<MemberSignature Language="VB.NET" Value="Public Property MinLines As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property int MinLines { int get(); void set(int value); };" />
<MemberSignature Language="F#" Value="member this.MinLines : int with get, set" Usage="System.Windows.Controls.TextBox.MinLines" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(1)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the minimum number of visible lines.</summary>
<value>The minimum number of visible lines. The default is 1.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Getting this property returns the current value of <xref:System.Windows.Controls.TextBox.MinLines%2A>. Setting this property causes the text box to resize if the number of visible lines is less than value specified by <xref:System.Windows.Controls.TextBox.MinLines%2A>.
If the <xref:System.Windows.FrameworkElement.Height%2A> property is explicitly set on a <xref:System.Windows.Controls.TextBox>, the <xref:System.Windows.Controls.TextBox.MaxLines%2A> and <xref:System.Windows.Controls.TextBox.MinLines%2A> property values are ignored.
<a name="dependencyPropertyInfo_MinLines"></a>
## Dependency Property Information
|||
|-|-|
|Identifier field|<xref:System.Windows.Controls.TextBox.MinLinesProperty>|
|Metadata properties set to `true`|<xref:System.Windows.FrameworkPropertyMetadata.AffectsMeasure%2A>|
## Examples
The following example shows how to create a <xref:System.Windows.Controls.TextBox> with a <xref:System.Windows.Controls.TextBox.MinLines%2A> value of 1.
[!code-xaml[TextBoxMiscSnippets_snip#TextBoxExampleWholePage](~/samples/snippets/csharp/VS_Snippets_Wpf/TextBoxMiscSnippets_snip/csharp/textboxexample.xaml#textboxexamplewholepage)]
[!code-csharp[TextBoxMiscSnippets_procedural_snip#TextBoxCodeExampleInline1](~/samples/snippets/csharp/VS_Snippets_Wpf/TextBoxMiscSnippets_procedural_snip/CSharp/TextBoxExample.cs#textboxcodeexampleinline1)]
[!code-vb[TextBoxMiscSnippets_procedural_snip#TextBoxCodeExampleInline1](~/samples/snippets/visualbasic/VS_Snippets_Wpf/TextBoxMiscSnippets_procedural_snip/visualbasic/textboxexample.vb#textboxcodeexampleinline1)]
]]></format>
</remarks>
<exception cref="T:System.Exception">
<see cref="P:System.Windows.Controls.TextBox.MinLines" /> is greater than <see cref="P:System.Windows.Controls.TextBox.MaxLines" />.</exception>
<altmember cref="P:System.Windows.Controls.TextBox.MaxLines" />
<altmember cref="P:System.Windows.Controls.TextBox.MaxLength" />
</Docs>
</Member>
<Member MemberName="MinLinesProperty">
<MemberSignature Language="C#" Value="public static readonly System.Windows.DependencyProperty MinLinesProperty;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly class System.Windows.DependencyProperty MinLinesProperty" />
<MemberSignature Language="DocId" Value="F:System.Windows.Controls.TextBox.MinLinesProperty" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly MinLinesProperty As DependencyProperty " />
<MemberSignature Language="C++ CLI" Value="public: static initonly System::Windows::DependencyProperty ^ MinLinesProperty;" />
<MemberSignature Language="F#" Value=" staticval mutable MinLinesProperty : System.Windows.DependencyProperty" Usage="System.Windows.Controls.TextBox.MinLinesProperty" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.DependencyProperty</ReturnType>
</ReturnValue>
<Docs>
<summary>Identifies the <see cref="P:System.Windows.Controls.TextBox.MinLines" /> dependency property.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="OnCreateAutomationPeer">
<MemberSignature Language="C#" Value="protected override System.Windows.Automation.Peers.AutomationPeer OnCreateAutomationPeer ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance class System.Windows.Automation.Peers.AutomationPeer OnCreateAutomationPeer() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Controls.TextBox.OnCreateAutomationPeer" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Function OnCreateAutomationPeer () As AutomationPeer" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; override System::Windows::Automation::Peers::AutomationPeer ^ OnCreateAutomationPeer();" />
<MemberSignature Language="F#" Value="override this.OnCreateAutomationPeer : unit -&gt; System.Windows.Automation.Peers.AutomationPeer" Usage="textBox.OnCreateAutomationPeer " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Automation.Peers.AutomationPeer</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Creates and returns an <see cref="T:System.Windows.Automation.Peers.AutomationPeer" /> object for the text box.</summary>
<returns>An <see cref="T:System.Windows.Automation.Peers.AutomationPeer" /> object for the text box.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method overrides <xref:System.Windows.ContentElement.OnCreateAutomationPeer%2A?displayProperty=nameWithType>.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="OnPropertyChanged">
<MemberSignature Language="C#" Value="protected override void OnPropertyChanged (System.Windows.DependencyPropertyChangedEventArgs e);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance void OnPropertyChanged(valuetype System.Windows.DependencyPropertyChangedEventArgs e) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Controls.TextBox.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Sub OnPropertyChanged (e As DependencyPropertyChangedEventArgs)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; override void OnPropertyChanged(System::Windows::DependencyPropertyChangedEventArgs e);" />
<MemberSignature Language="F#" Value="override this.OnPropertyChanged : System.Windows.DependencyPropertyChangedEventArgs -&gt; unit" Usage="textBox.OnPropertyChanged e" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="e" Type="System.Windows.DependencyPropertyChangedEventArgs" />
</Parameters>
<Docs>
<param name="e">Arguments for the associated event.</param>
<summary>Called when one or more of the dependency properties that exist on the element have had their effective values changed.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method overrides <xref:System.Windows.FrameworkElement.OnPropertyChanged%2A?displayProperty=nameWithType>.
]]></format>
</remarks>
<altmember cref="T:System.Windows.DependencyPropertyChangedEventHandler" />
</Docs>
</Member>
<Member MemberName="ScrollToLine">
<MemberSignature Language="C#" Value="public void ScrollToLine (int lineIndex);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void ScrollToLine(int32 lineIndex) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Controls.TextBox.ScrollToLine(System.Int32)" />
<MemberSignature Language="VB.NET" Value="Public Sub ScrollToLine (lineIndex As Integer)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void ScrollToLine(int lineIndex);" />
<MemberSignature Language="F#" Value="member this.ScrollToLine : int -&gt; unit" Usage="textBox.ScrollToLine lineIndex" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="lineIndex" Type="System.Int32" />
</Parameters>
<Docs>
<param name="lineIndex">The zero-based line index of the line to scroll into view.</param>
<summary>Scrolls the line at the specified line index into view.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method causes the text box to scroll by the minimum amount necessary to bring the specified line into full view.
]]></format>
</remarks>
<altmember cref="M:System.Windows.Controls.TextBox.GetFirstVisibleLineIndex" />
<altmember cref="M:System.Windows.Controls.TextBox.GetLastVisibleLineIndex" />
<altmember cref="P:System.Windows.Controls.TextBox.LineCount" />
</Docs>
</Member>
<Member MemberName="Select">
<MemberSignature Language="C#" Value="public void Select (int start, int length);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Select(int32 start, int32 length) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Controls.TextBox.Select(System.Int32,System.Int32)" />
<MemberSignature Language="VB.NET" Value="Public Sub Select (start As Integer, length As Integer)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void Select(int start, int length);" />
<MemberSignature Language="F#" Value="member this.Select : int * int -&gt; unit" Usage="textBox.Select (start, length)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="start" Type="System.Int32" />
<Parameter Name="length" Type="System.Int32" />
</Parameters>
<Docs>
<param name="start">The zero-based character index of the first character in the selection.</param>
<param name="length">The length of the selection, in characters.</param>
<summary>Selects a range of text in the text box.</summary>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">
<paramref name="start" /> or <paramref name="length" /> is negative.</exception>
<altmember cref="P:System.Windows.Controls.TextBox.SelectedText" />
<altmember cref="P:System.Windows.Controls.TextBox.SelectionLength" />
<altmember cref="P:System.Windows.Controls.TextBox.SelectionStart" />
</Docs>
</Member>
<Member MemberName="SelectedText">
<MemberSignature Language="C#" Value="public string SelectedText { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string SelectedText" />
<MemberSignature Language="DocId" Value="P:System.Windows.Controls.TextBox.SelectedText" />
<MemberSignature Language="VB.NET" Value="Public Property SelectedText As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::String ^ SelectedText { System::String ^ get(); void set(System::String ^ value); };" />
<MemberSignature Language="F#" Value="member this.SelectedText : string with get, set" Usage="System.Windows.Controls.TextBox.SelectedText" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the content of the current selection in the text box.</summary>
<value>The currently selected text in the text box.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Getting this property returns a string copy of the currently selected text. Setting this property replaces the current selection with the specified string.
]]></format>
</remarks>
<altmember cref="M:System.Windows.Controls.TextBox.Select(System.Int32,System.Int32)" />
<altmember cref="P:System.Windows.Controls.TextBox.SelectionLength" />
<altmember cref="P:System.Windows.Controls.TextBox.SelectionStart" />
</Docs>
</Member>
<Member MemberName="SelectionLength">
<MemberSignature Language="C#" Value="public int SelectionLength { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 SelectionLength" />
<MemberSignature Language="DocId" Value="P:System.Windows.Controls.TextBox.SelectionLength" />
<MemberSignature Language="VB.NET" Value="Public Property SelectionLength As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property int SelectionLength { int get(); void set(int value); };" />
<MemberSignature Language="F#" Value="member this.SelectionLength : int with get, set" Usage="System.Windows.Controls.TextBox.SelectionLength" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(0)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value indicating the number of characters in the current selection in the text box.</summary>
<value>The number of characters in the current selection in the text box. The default is 0.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Getting this property returns the number of characters in the current selection. Setting this property adjusts the length of the current selection to the specified value, keeping the beginning of the selection fixed.
In general, when the specified selection length causes the selection to end in an invalid position (for example, between a carriage return and a new-line character, or inside a tag), the selection length automatically adjusts so that the resulting selection starts and ends in valid positions.
]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">
<see cref="P:System.Windows.Controls.TextBox.SelectionLength" /> is set to a negative value.</exception>
<altmember cref="M:System.Windows.Controls.TextBox.Select(System.Int32,System.Int32)" />
<altmember cref="P:System.Windows.Controls.TextBox.SelectedText" />
<altmember cref="P:System.Windows.Controls.TextBox.SelectionStart" />
</Docs>
</Member>
<Member MemberName="SelectionStart">
<MemberSignature Language="C#" Value="public int SelectionStart { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 SelectionStart" />
<MemberSignature Language="DocId" Value="P:System.Windows.Controls.TextBox.SelectionStart" />
<MemberSignature Language="VB.NET" Value="Public Property SelectionStart As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property int SelectionStart { int get(); void set(int value); };" />
<MemberSignature Language="F#" Value="member this.SelectionStart : int with get, set" Usage="System.Windows.Controls.TextBox.SelectionStart" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue(0)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a character index for the beginning of the current selection.</summary>
<value>The character index for the beginning of the current selection.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
In cases where the specified selection length would cause the selection to end between a carriage return and a new-line character, the selection length is automatically increased by 1 so that the resulting selection spans the entire end-of-line marker.
]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">
<see cref="P:System.Windows.Controls.TextBox.SelectionStart" /> is set to a negative value.</exception>
<altmember cref="M:System.Windows.Controls.TextBox.Select(System.Int32,System.Int32)" />
<altmember cref="P:System.Windows.Controls.TextBox.SelectedText" />
<altmember cref="P:System.Windows.Controls.TextBox.SelectionLength" />
</Docs>
</Member>
<Member MemberName="ShouldSerializeText">
<MemberSignature Language="C#" Value="public bool ShouldSerializeText (System.Windows.Markup.XamlDesignerSerializationManager manager);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance bool ShouldSerializeText(class System.Windows.Markup.XamlDesignerSerializationManager manager) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Controls.TextBox.ShouldSerializeText(System.Windows.Markup.XamlDesignerSerializationManager)" />
<MemberSignature Language="VB.NET" Value="Public Function ShouldSerializeText (manager As XamlDesignerSerializationManager) As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; bool ShouldSerializeText(System::Windows::Markup::XamlDesignerSerializationManager ^ manager);" />
<MemberSignature Language="F#" Value="member this.ShouldSerializeText : System.Windows.Markup.XamlDesignerSerializationManager -&gt; bool" Usage="textBox.ShouldSerializeText manager" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="manager" Type="System.Windows.Markup.XamlDesignerSerializationManager" />
</Parameters>
<Docs>
<param name="manager">A serialization service manager object for this object.</param>
<summary>Returns a value that indicates whether the effective value of the <see cref="P:System.Windows.Controls.TextBox.Text" /> property should be serialized during serialization of the <see cref="T:System.Windows.Controls.TextBox" /> object.</summary>
<returns>
<see langword="true" /> if the <see cref="P:System.Windows.Controls.TextBox.Text" /> property should be serialized; otherwise, <see langword="false" />.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.NullReferenceException">
<paramref name="manager" /> is <see langword="null" />.</exception>
</Docs>
</Member>
<Member MemberName="System.Windows.Markup.IAddChild.AddChild">
<MemberSignature Language="C#" Value="void IAddChild.AddChild (object value);" />
<MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance void System.Windows.Markup.IAddChild.AddChild(object value) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Controls.TextBox.System#Windows#Markup#IAddChild#AddChild(System.Object)" />
<MemberSignature Language="VB.NET" Value="Sub AddChild (value As Object) Implements IAddChild.AddChild" />
<MemberSignature Language="C++ CLI" Value=" virtual void System.Windows.Markup.IAddChild.AddChild(System::Object ^ value) = System::Windows::Markup::IAddChild::AddChild;" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Windows.Markup.IAddChild.AddChild(System.Object)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.Object" />
</Parameters>
<Docs>
<param name="value">An object to add as a child.</param>
<summary>Throws an exception in all cases.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
<xref:System.Windows.Controls.TextBox> accepts only text through the <xref:System.Windows.Markup.IAddChild> interface.
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="value" /> is <see langword="null" />.</exception>
<exception cref="T:System.InvalidOperationException">In all other cases.</exception>
</Docs>
</Member>
<Member MemberName="System.Windows.Markup.IAddChild.AddText">
<MemberSignature Language="C#" Value="void IAddChild.AddText (string text);" />
<MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance void System.Windows.Markup.IAddChild.AddText(string text) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Controls.TextBox.System#Windows#Markup#IAddChild#AddText(System.String)" />
<MemberSignature Language="VB.NET" Value="Sub AddText (text As String) Implements IAddChild.AddText" />
<MemberSignature Language="C++ CLI" Value=" virtual void System.Windows.Markup.IAddChild.AddText(System::String ^ text) = System::Windows::Markup::IAddChild::AddText;" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Windows.Markup.IAddChild.AddText(System.String)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="text" Type="System.String" />
</Parameters>
<Docs>
<param name="text">A string to add to the object.</param>
<summary>Adds the text content of a node to the object.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This member is an explicit interface member implementation. It can be used only when the <xref:System.Windows.Controls.TextBox> instance is cast to an <xref:System.Windows.Markup.IAddChild> interface.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Text">
<MemberSignature Language="C#" Value="public string Text { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string Text" />
<MemberSignature Language="DocId" Value="P:System.Windows.Controls.TextBox.Text" />
<MemberSignature Language="VB.NET" Value="Public Property Text As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::String ^ Text { System::String ^ get(); void set(System::String ^ value); };" />
<MemberSignature Language="F#" Value="member this.Text : string with get, set" Usage="System.Windows.Controls.TextBox.Text" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DefaultValue("")</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Windows.Localizability(System.Windows.LocalizationCategory.Text)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the text contents of the text box.</summary>
<value>A string containing the text contents of the text box. The default is an empty string ("").</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Getting this property returns a string copy of the contents of the text box. Setting this property replaces the contents of the text box with the specified string.
This property does not support animation.
When used in data-binding scenarios, this property uses the default update behavior of <xref:System.Windows.Data.UpdateSourceTrigger.LostFocus?displayProperty=nameWithType>.
<a name="xamlPropertyElementUsage_Text"></a>
## XAML Property Element Usage
```
<object>
String
</object>
```
<a name="dependencyPropertyInfo_Text"></a>
## Dependency Property Information
|||
|-|-|
|Identifier field|<xref:System.Windows.Controls.TextBox.TextProperty>|
|Metadata properties set to `true`|<xref:System.Windows.FrameworkPropertyMetadata.BindsTwoWayByDefault%2A>, <xref:System.Windows.FrameworkPropertyMetadata.Journal%2A>|
]]></format>
</remarks>
<altmember cref="P:System.Windows.Controls.TextBox.CharacterCasing" />
<altmember cref="P:System.Windows.Controls.TextBox.TextAlignment" />
</Docs>
</Member>
<Member MemberName="TextAlignment">
<MemberSignature Language="C#" Value="public System.Windows.TextAlignment TextAlignment { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Windows.TextAlignment TextAlignment" />
<MemberSignature Language="DocId" Value="P:System.Windows.Controls.TextBox.TextAlignment" />
<MemberSignature Language="VB.NET" Value="Public Property TextAlignment As TextAlignment" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Windows::TextAlignment TextAlignment { System::Windows::TextAlignment get(); void set(System::Windows::TextAlignment value); };" />
<MemberSignature Language="F#" Value="member this.TextAlignment : System.Windows.TextAlignment with get, set" Usage="System.Windows.Controls.TextBox.TextAlignment" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.TextAlignment</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the horizontal alignment of the contents of the text box.</summary>
<value>One of the <see cref="T:System.Windows.TextAlignment" /> values that specifies the horizontal alignment of the contents of the text box. The default is <see cref="F:System.Windows.TextAlignment.Left" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Getting this property returns the current alignment. Setting this property adjusts the contents of the text box to reflect the specified alignment.
This property has a higher precedence than the <xref:System.Windows.Controls.Control.HorizontalContentAlignment%2A> property.
<a name="dependencyPropertyInfo_TextAlignment"></a>
## Dependency Property Information
|||
|-|-|
|Identifier field|<xref:System.Windows.Controls.TextBox.TextAlignmentProperty>|
|Metadata properties set to `true`|<xref:System.Windows.FrameworkPropertyMetadata.AffectsMeasure%2A>, <xref:System.Windows.FrameworkPropertyMetadata.AffectsRender%2A>, <xref:System.Windows.FrameworkPropertyMetadata.Inherits%2A>|
## Examples
The following example shows how to create a <xref:System.Windows.Controls.TextBox> with a <xref:System.Windows.Controls.TextBox.TextAlignment%2A> of <xref:System.Windows.TextAlignment.Center?displayProperty=nameWithType>.
[!code-xaml[TextBoxMiscSnippets_snip#TextBoxExampleWholePage](~/samples/snippets/csharp/VS_Snippets_Wpf/TextBoxMiscSnippets_snip/csharp/textboxexample.xaml#textboxexamplewholepage)]
[!code-csharp[TextBoxMiscSnippets_procedural_snip#TextBoxCodeExampleInline1](~/samples/snippets/csharp/VS_Snippets_Wpf/TextBoxMiscSnippets_procedural_snip/CSharp/TextBoxExample.cs#textboxcodeexampleinline1)]
[!code-vb[TextBoxMiscSnippets_procedural_snip#TextBoxCodeExampleInline1](~/samples/snippets/visualbasic/VS_Snippets_Wpf/TextBoxMiscSnippets_procedural_snip/visualbasic/textboxexample.vb#textboxcodeexampleinline1)]
]]></format>
</remarks>
<altmember cref="P:System.Windows.Controls.TextBox.Text" />
<altmember cref="P:System.Windows.Controls.TextBox.CharacterCasing" />
</Docs>
</Member>
<Member MemberName="TextAlignmentProperty">
<MemberSignature Language="C#" Value="public static readonly System.Windows.DependencyProperty TextAlignmentProperty;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly class System.Windows.DependencyProperty TextAlignmentProperty" />
<MemberSignature Language="DocId" Value="F:System.Windows.Controls.TextBox.TextAlignmentProperty" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly TextAlignmentProperty As DependencyProperty " />
<MemberSignature Language="C++ CLI" Value="public: static initonly System::Windows::DependencyProperty ^ TextAlignmentProperty;" />
<MemberSignature Language="F#" Value=" staticval mutable TextAlignmentProperty : System.Windows.DependencyProperty" Usage="System.Windows.Controls.TextBox.TextAlignmentProperty" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.DependencyProperty</ReturnType>
</ReturnValue>
<Docs>
<summary>Identifies the <see cref="P:System.Windows.Controls.TextBox.TextAlignment" /> dependency property.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="TextDecorations">
<MemberSignature Language="C#" Value="public System.Windows.TextDecorationCollection TextDecorations { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Windows.TextDecorationCollection TextDecorations" />
<MemberSignature Language="DocId" Value="P:System.Windows.Controls.TextBox.TextDecorations" />
<MemberSignature Language="VB.NET" Value="Public Property TextDecorations As TextDecorationCollection" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Windows::TextDecorationCollection ^ TextDecorations { System::Windows::TextDecorationCollection ^ get(); void set(System::Windows::TextDecorationCollection ^ value); };" />
<MemberSignature Language="F#" Value="member this.TextDecorations : System.Windows.TextDecorationCollection with get, set" Usage="System.Windows.Controls.TextBox.TextDecorations" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.TextDecorationCollection</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the text decorations to apply to the text box.</summary>
<value>A <see cref="T:System.Windows.TextDecorationCollection" /> collection that contains text decorations to apply to the text box. The default is <see langword="null" /> (no text decorations applied).</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
A <xref:System.Windows.TextDecoration> object is a visual ornamentation you can add to text. There are four types of text decorations: underline, baseline, strikethrough, and overline. For more information about text decorations, see [How to: Create a Text Decoration](~/docs/framework/wpf/advanced/how-to-create-a-text-decoration.md).
<a name="dependencyPropertyInfo_TextDecorations"></a>
## Dependency Property Information
|||
|-|-|
|Identifier field|<xref:System.Windows.Controls.TextBox.TextDecorationsProperty>|
|Metadata properties set to `true`|<xref:System.Windows.FrameworkPropertyMetadata.AffectsRender%2A>|
## Examples
The following example shows how to set the <xref:System.Windows.Documents.Inline.TextDecorations%2A> attribute, using <xref:System.Windows.Documents.Run> as the example element.
[!code-xaml[InlineSnippets#_Inline_TextDecXAML](~/samples/snippets/csharp/VS_Snippets_Wpf/InlineSnippets/CSharp/Window1.xaml#_inline_textdecxaml)]
The following figure shows how this example renders.
![Screenshot: Text with default strikethrough effect](~/add/media/inline-textdec-strike.png "Screenshot: Text with default strikethrough effect")
The following figures show how the <xref:System.Windows.TextDecorations.OverLine%2A>, <xref:System.Windows.TextDecorations.Baseline%2A>, and <xref:System.Windows.TextDecorations.Underline%2A> decorations render, respectively.
![Screenshot: Overline TextDecorator](~/add/media/inline-textdec-over.png "Screenshot: Overline TextDecorator")
![Screenshot: Default baseline effect on text](~/add/media/inline-textdec-base.png "Screenshot: Default baseline effect on text")
![Screenshot: Text with default underline effect](~/add/media/inline-textdec-under.png "Screenshot: Text with default underline effect")
The following example shows how to set the <xref:System.Windows.Documents.Inline.TextDecorations%2A> property programmatically.
[!code-csharp[InlineSnippets#_Inline_TextDec](~/samples/snippets/csharp/VS_Snippets_Wpf/InlineSnippets/CSharp/Window1.xaml.cs#_inline_textdec)]
[!code-vb[InlineSnippets#_Inline_TextDec](~/samples/snippets/visualbasic/VS_Snippets_Wpf/InlineSnippets/visualbasic/window1.xaml.vb#_inline_textdec)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="TextDecorationsProperty">
<MemberSignature Language="C#" Value="public static readonly System.Windows.DependencyProperty TextDecorationsProperty;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly class System.Windows.DependencyProperty TextDecorationsProperty" />
<MemberSignature Language="DocId" Value="F:System.Windows.Controls.TextBox.TextDecorationsProperty" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly TextDecorationsProperty As DependencyProperty " />
<MemberSignature Language="C++ CLI" Value="public: static initonly System::Windows::DependencyProperty ^ TextDecorationsProperty;" />
<MemberSignature Language="F#" Value=" staticval mutable TextDecorationsProperty : System.Windows.DependencyProperty" Usage="System.Windows.Controls.TextBox.TextDecorationsProperty" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.DependencyProperty</ReturnType>
</ReturnValue>
<Docs>
<summary>Identifies the <see cref="P:System.Windows.Controls.TextBox.TextDecorations" /> dependency property.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The identifier for the <xref:System.Windows.Controls.TextBox.TextDecorations%2A> dependency property.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="TextProperty">
<MemberSignature Language="C#" Value="public static readonly System.Windows.DependencyProperty TextProperty;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly class System.Windows.DependencyProperty TextProperty" />
<MemberSignature Language="DocId" Value="F:System.Windows.Controls.TextBox.TextProperty" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly TextProperty As DependencyProperty " />
<MemberSignature Language="C++ CLI" Value="public: static initonly System::Windows::DependencyProperty ^ TextProperty;" />
<MemberSignature Language="F#" Value=" staticval mutable TextProperty : System.Windows.DependencyProperty" Usage="System.Windows.Controls.TextBox.TextProperty" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.DependencyProperty</ReturnType>
</ReturnValue>
<Docs>
<summary>Identifies the <see cref="P:System.Windows.Controls.TextBox.Text" /> dependency property.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="TextWrapping">
<MemberSignature Language="C#" Value="public System.Windows.TextWrapping TextWrapping { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Windows.TextWrapping TextWrapping" />
<MemberSignature Language="DocId" Value="P:System.Windows.Controls.TextBox.TextWrapping" />
<MemberSignature Language="VB.NET" Value="Public Property TextWrapping As TextWrapping" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Windows::TextWrapping TextWrapping { System::Windows::TextWrapping get(); void set(System::Windows::TextWrapping value); };" />
<MemberSignature Language="F#" Value="member this.TextWrapping : System.Windows.TextWrapping with get, set" Usage="System.Windows.Controls.TextBox.TextWrapping" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.TextWrapping</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets how the text box should wrap text.</summary>
<value>One of the <see cref="T:System.Windows.TextWrapping" /> values that indicates how the text box should wrap text. The default is <see cref="F:System.Windows.TextWrapping.NoWrap" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Setting the <xref:System.Windows.Controls.TextBox.TextWrapping%2A> attribute to <xref:System.Windows.TextWrapping.Wrap> causes entered text to wrap to a new line when the edge of the <xref:System.Windows.Controls.TextBox> control is reached, automatically expanding the height of the <xref:System.Windows.Controls.TextBox> control to include room for a new line, if necessary.
<a name="dependencyPropertyInfo_TextWrapping"></a>
## Dependency Property Information
|||
|-|-|
|Identifier field|<xref:System.Windows.Controls.TextBox.TextWrappingProperty>|
|Metadata properties set to `true`|<xref:System.Windows.FrameworkPropertyMetadata.AffectsMeasure%2A>, <xref:System.Windows.FrameworkPropertyMetadata.AffectsRender%2A>|
## Examples
The following example demonstrates how to set the value of this property.
[!code-csharp[TextBoxBase_Samp#TextBoxBase12](~/samples/snippets/csharp/VS_Snippets_Wpf/TextBoxBase_Samp/CSharp/Window1.xaml.cs#textboxbase12)]
[!code-vb[TextBoxBase_Samp#TextBoxBase12](~/samples/snippets/visualbasic/VS_Snippets_Wpf/TextBoxBase_Samp/VisualBasic/Window1.xaml.vb#textboxbase12)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="TextWrappingProperty">
<MemberSignature Language="C#" Value="public static readonly System.Windows.DependencyProperty TextWrappingProperty;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly class System.Windows.DependencyProperty TextWrappingProperty" />
<MemberSignature Language="DocId" Value="F:System.Windows.Controls.TextBox.TextWrappingProperty" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly TextWrappingProperty As DependencyProperty " />
<MemberSignature Language="C++ CLI" Value="public: static initonly System::Windows::DependencyProperty ^ TextWrappingProperty;" />
<MemberSignature Language="F#" Value=" staticval mutable TextWrappingProperty : System.Windows.DependencyProperty" Usage="System.Windows.Controls.TextBox.TextWrappingProperty" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.DependencyProperty</ReturnType>
</ReturnValue>
<Docs>
<summary>Identifies the <see cref="P:System.Windows.Controls.TextBox.TextWrapping" /> dependency property.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The identifier for the <xref:System.Windows.Controls.TextBox.TextWrapping%2A> dependency property.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Typography">
<MemberSignature Language="C#" Value="public System.Windows.Documents.Typography Typography { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Windows.Documents.Typography Typography" />
<MemberSignature Language="DocId" Value="P:System.Windows.Controls.TextBox.Typography" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Typography As Typography" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Windows::Documents::Typography ^ Typography { System::Windows::Documents::Typography ^ get(); };" />
<MemberSignature Language="F#" Value="member this.Typography : System.Windows.Documents.Typography" Usage="System.Windows.Controls.TextBox.Typography" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Documents.Typography</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the currently effective typography variations for the text contents of the text box.</summary>
<value>A <see cref="T:System.Windows.Documents.Typography" /> object that specifies the currently effective typography variations. For a list of default typography values, see <see cref="T:System.Windows.Documents.Typography" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Documents.FlowDocument.Typography%2A> property is applicable only to [!INCLUDE[TLA#tla_opentype](~/includes/tlasharptla-opentype-md.md)] fonts. A typography variant has no effect on fonts that do not support the variant. For more information about this topic, see [Typography in WPF](~/docs/framework/wpf/advanced/typography-in-wpf.md).
## Examples
The following example shows how to set the <xref:System.Windows.Documents.TextElement.Typography%2A> attribute, using <xref:System.Windows.Documents.Paragraph> as the example element.
[!code-xaml[TextElementSnippets#_TextElement_TypogXAML](~/samples/snippets/csharp/VS_Snippets_Wpf/TextElementSnippets/CSharp/Window1.xaml#_textelement_typogxaml)]
The following figure shows how this example renders.
![Screenshot: Text with altered typography](~/add/media/textelement-typog.png "Screenshot: Text with altered typography")
In contrast, the following figure shows how a similar example with default typographic properties renders.
![Screenshot: Text with altered typography](~/add/media/textelement-typog-default.png "Screenshot: Text with altered typography")
The following example shows how to set the <xref:System.Windows.Controls.TextBox.Typography%2A> property programmatically.
[!code-csharp[TextElementSnippets#_TextElement_Typog](~/samples/snippets/csharp/VS_Snippets_Wpf/TextElementSnippets/CSharp/Window1.xaml.cs#_textelement_typog)]
[!code-vb[TextElementSnippets#_TextElement_Typog](~/samples/snippets/visualbasic/VS_Snippets_Wpf/TextElementSnippets/visualbasic/window1.xaml.vb#_textelement_typog)]
]]></format>
</remarks>
</Docs>
</Member>
</Members>
</Type>
You can’t perform that action at this time.