An abstract base class that provides functionality for text editing controls, including TextBox and RichTextBox.
<LocalizabilityAttribute(LocalizationCategory.Text)> _ <TemplatePartAttribute(Name := "PART_ContentHost", Type := GetType(FrameworkElement))> _ Public MustInherit Class TextBoxBase _ Inherits Control
Dim instance As TextBoxBase
[LocalizabilityAttribute(LocalizationCategory.Text)] [TemplatePartAttribute(Name = "PART_ContentHost", Type = typeof(FrameworkElement))] public abstract class TextBoxBase : Control
[LocalizabilityAttribute(LocalizationCategory::Text)] [TemplatePartAttribute(Name = L"PART_ContentHost", Type = typeof(FrameworkElement))] public ref class TextBoxBase abstract : public Control
public abstract class TextBoxBase extends Control
This class is abstract; see Inheritance Hierarchy for derived non-abstract classes usable in XAML.
The following example demonstrates how to use the derived TextBox object in Extensible Application Markup Language (XAML).
<TextBox TextWrapping="Wrap" Name="myTextBox" Width="500" Height="200" AcceptsReturn="True" IsUndoEnabled="True" VerticalScrollBarVisibility="Visible" HorizontalScrollBarVisibility="Auto" Margin="25">
The following example demonstrates how to use the derived RichTextBox object in code.
RichTextBox richTextBox = new RichTextBox(); richTextBox.PreviewMouseUp += MouseUpHandler; richTextBox.PreviewMouseDown += MouseDownHandler; // Note: Event listeners can also be added using the AddHandler // method.
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003