RichEditBox
RichEditBox
RichEditBox
RichEditBox
Class
Definition
Some information relates to pre-released product which may be substantially modified before it’s commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Prerelease APIs are identified by a Prerelease label.
[Contains prerelease APIs.]
Represents a rich text editing control that supports formatted text, hyperlinks, and other rich content.
public : class RichEditBox : Control, IRichEditBox, IRichEditBox2, IRichEditBox3, IRichEditBox4, IRichEditBox5public class RichEditBox : Control, IRichEditBox, IRichEditBox2, IRichEditBox3, IRichEditBox4, IRichEditBox5Public Class RichEditBox Inherits Control Implements IRichEditBox, IRichEditBox2, IRichEditBox3, IRichEditBox4, IRichEditBox5// This API is not available in Javascript.
<RichEditBox .../>
- Inheritance
- Attributes
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
Inherited Members
Inherited properties
Inherited events
Inherited methods
Examples
This example shows how to use the ITextDocument.SetText method to programmatically add text to a RichEditBox.
<RichEditBox x:Name="richEditBox" Width="500" Header="Notes"/>
richEditBox.Document.SetText(Windows.UI.Text.TextSetOptions.None, "This is some sample text");
This example shows how to edit, load, and save a Rich Text Format (.rtf) file in a RichEditBox.
<RelativePanel Margin="20" HorizontalAlignment="Stretch">
<RelativePanel.Resources>
<Style TargetType="AppBarButton">
<Setter Property="IsCompact" Value="True"/>
</Style>
</RelativePanel.Resources>
<AppBarButton x:Name="openFileButton" Icon="OpenFile"
Click="OpenButton_Click" ToolTipService.ToolTip="Open file"/>
<AppBarButton Icon="Save" Click="SaveButton_Click"
ToolTipService.ToolTip="Save file"
RelativePanel.RightOf="openFileButton" Margin="8,0,0,0"/>
<AppBarButton Icon="Bold" Click="BoldButton_Click" ToolTipService.ToolTip="Bold"
RelativePanel.LeftOf="italicButton" Margin="0,0,8,0"/>
<AppBarButton x:Name="italicButton" Icon="Italic" Click="ItalicButton_Click"
ToolTipService.ToolTip="Italic" RelativePanel.LeftOf="underlineButton" Margin="0,0,8,0"/>
<AppBarButton x:Name="underlineButton" Icon="Underline" Click="UnderlineButton_Click"
ToolTipService.ToolTip="Underline" RelativePanel.AlignRightWithPanel="True"/>
<RichEditBox x:Name="editor" Height="200" RelativePanel.Below="openFileButton"
RelativePanel.AlignLeftWithPanel="True" RelativePanel.AlignRightWithPanel="True"/>
</RelativePanel>
private async void OpenButton_Click(object sender, RoutedEventArgs e)
{
// Open a text file.
Windows.Storage.Pickers.FileOpenPicker open =
new Windows.Storage.Pickers.FileOpenPicker();
open.SuggestedStartLocation =
Windows.Storage.Pickers.PickerLocationId.DocumentsLibrary;
open.FileTypeFilter.Add(".rtf");
Windows.Storage.StorageFile file = await open.PickSingleFileAsync();
if (file != null)
{
try
{
Windows.Storage.Streams.IRandomAccessStream randAccStream =
await file.OpenAsync(Windows.Storage.FileAccessMode.Read);
// Load the file into the Document property of the RichEditBox.
editor.Document.LoadFromStream(Windows.UI.Text.TextSetOptions.FormatRtf, randAccStream);
}
catch (Exception)
{
ContentDialog errorDialog = new ContentDialog()
{
Title = "File open error",
Content = "Sorry, I couldn't open the file.",
PrimaryButtonText = "Ok"
};
await errorDialog.ShowAsync();
}
}
}
private async void SaveButton_Click(object sender, RoutedEventArgs e)
{
Windows.Storage.Pickers.FileSavePicker savePicker = new Windows.Storage.Pickers.FileSavePicker();
savePicker.SuggestedStartLocation = Windows.Storage.Pickers.PickerLocationId.DocumentsLibrary;
// Dropdown of file types the user can save the file as
savePicker.FileTypeChoices.Add("Rich Text", new List<string>() { ".rtf" });
// Default file name if the user does not type one in or select a file to replace
savePicker.SuggestedFileName = "New Document";
Windows.Storage.StorageFile file = await savePicker.PickSaveFileAsync();
if (file != null)
{
// Prevent updates to the remote version of the file until we
// finish making changes and call CompleteUpdatesAsync.
Windows.Storage.CachedFileManager.DeferUpdates(file);
// write to file
Windows.Storage.Streams.IRandomAccessStream randAccStream =
await file.OpenAsync(Windows.Storage.FileAccessMode.ReadWrite);
editor.Document.SaveToStream(Windows.UI.Text.TextGetOptions.FormatRtf, randAccStream);
// Let Windows know that we're finished changing the file so the
// other app can update the remote version of the file.
Windows.Storage.Provider.FileUpdateStatus status = await Windows.Storage.CachedFileManager.CompleteUpdatesAsync(file);
if (status != Windows.Storage.Provider.FileUpdateStatus.Complete)
{
Windows.UI.Popups.MessageDialog errorBox =
new Windows.UI.Popups.MessageDialog("File " + file.Name + " couldn't be saved.");
await errorBox.ShowAsync();
}
}
}
private void BoldButton_Click(object sender, RoutedEventArgs e)
{
Windows.UI.Text.ITextSelection selectedText = editor.Document.Selection;
if (selectedText != null)
{
Windows.UI.Text.ITextCharacterFormat charFormatting = selectedText.CharacterFormat;
charFormatting.Bold = Windows.UI.Text.FormatEffect.Toggle;
selectedText.CharacterFormat = charFormatting;
}
}
private void ItalicButton_Click(object sender, RoutedEventArgs e)
{
Windows.UI.Text.ITextSelection selectedText = editor.Document.Selection;
if (selectedText != null)
{
Windows.UI.Text.ITextCharacterFormat charFormatting = selectedText.CharacterFormat;
charFormatting.Italic = Windows.UI.Text.FormatEffect.Toggle;
selectedText.CharacterFormat = charFormatting;
}
}
private void UnderlineButton_Click(object sender, RoutedEventArgs e)
{
Windows.UI.Text.ITextSelection selectedText = editor.Document.Selection;
if (selectedText != null)
{
Windows.UI.Text.ITextCharacterFormat charFormatting = selectedText.CharacterFormat;
if (charFormatting.Underline == Windows.UI.Text.UnderlineType.None)
{
charFormatting.Underline = Windows.UI.Text.UnderlineType.Single;
}
else {
charFormatting.Underline = Windows.UI.Text.UnderlineType.None;
}
selectedText.CharacterFormat = charFormatting;
}
}
Remarks
RichEditBox is a control that lets a user enter formatted text such as bold, italic, and underlined. RichEditBox can also display Rich Text Format (.rtf) documents including hyperlinks and images (.jpg, .png, etc). This control is designed for advanced text editing scenarios. For simple plain text input, like on a form, consider using TextBox.
You use the Document property of the RichEditBox to get its content. The content of a RichEditBox is a Windows.UI.Text.ITextDocument object, which gives you access to the underlying Text Object Model APIs.
For more info and examples, see the RichEditBox control guide.
Control style and template
You can modify the default Style and ControlTemplate to give the control a unique appearance. For information about modifying a control's style and template, see Styling controls. The default style, template, and resources that define the look of the control are included in the generic.xaml file. For design purposes, generic.xaml is available in the (Program Files)\Windows Kits\10\DesignTime\CommonConfiguration\Neutral\UAP<SDK version>\Generic folder from a Windows Software Development Kit (SDK) installation. Styles and resources from different versions of the SDK might have different values.
Starting in Windows 10, version 1607 (Windows Software Development Kit (SDK) version 10.0.14393.0), generic.xaml includes resources that you can use to modify the colors of a control in different visual states without modifying the control template. In apps that target this software development kit (SDK) or later, modifying these resources is preferred to setting properties such as Background and Foreground. For more info, see the Light-weight styling section of the Styling controls article.
This table shows the resources used by the RichEditBox control. Resources that start with "TextControl" are shared by TextBox, PasswordBox, RichEditBox, and AutoSuggestBox.
| Resource key | Description |
|---|---|
| TextControlForeground | Text color at rest and not focused |
| TextControlForegroundPointerOver | Text color on hover |
| TextControlForegroundFocused | Text color when focused |
| TextControlForegroundDisabled | Text color when disabled |
| TextControlBackground | Background color at rest and not focused |
| TextControlBackgroundPointerOver | Background color on hover |
| TextControlBackgroundFocused | Background color when focused |
| TextControlBackgroundDisabled | Background color when disabled |
| TextControlBorderBrush | Border color at rest and not focused |
| TextControlBorderBrushPointerOver | Border color on hover |
| TextControlBorderBrushFocused | Border color when focused |
| TextControlBorderBrushDisabled | Border color when disabled |
| TextControlPlaceholderForeground | Placeholder text color at rest and not focused |
| TextControlPlaceholderForegroundPointerOver | Placeholder text color on hover |
| TextControlPlaceholderForegroundFocused | Placeholder text color when focused |
| TextControlPlaceholderForegroundDisabled | Placeholder text color when disabled |
| TextControlHeaderForeground | Header text color |
| TextControlHeaderForegroundDisabled | Header text color when disabled |
| TextControlSelectionHighlightColor | Highlight color of selected text |
| TextControlButtonBackground | Background color of delete button at rest |
| TextControlButtonBackgroundPointerOver | Background color of delete button on hover |
| TextControlButtonBackgroundPressed | Background color of delete button when pressed |
| TextControlButtonBorderBrush | Border color of delete button at rest |
| TextControlButtonBorderBrushPointerOver | Border color of delete button on hover |
| TextControlButtonBorderBrushPressed | Border color of delete button when pressed |
| TextControlButtonForeground | Foreground color of delete button at rest |
| TextControlButtonForegroundPointerOver | Foreground color of delete button on hover |
| TextControlButtonForegroundPressed | Foreground color of delete button when pressed |
Constructors
RichEditBox() RichEditBox() RichEditBox() RichEditBox()
Initializes a new instance of the RichEditBox class.
public : RichEditBox()public RichEditBox()Public Sub New()// This API is not available in Javascript.
Properties
AcceptsReturn AcceptsReturn AcceptsReturn AcceptsReturn
Gets or sets a value that indicates whether the RichEditBox allows and displays the newline or return characters when the ENTER or RETURN keys are pressed.
public : PlatForm::Boolean AcceptsReturn { get; set; }public bool AcceptsReturn { get; set; }Public ReadWrite Property AcceptsReturn As bool// This API is not available in Javascript.
<RichEditBox AcceptsReturn="bool"/>
- Value
- PlatForm::Boolean bool bool bool
True if the RichEditBox allows newline characters; otherwise, false. The default is true.
AcceptsReturnProperty AcceptsReturnProperty AcceptsReturnProperty AcceptsReturnProperty
Identifies the AcceptsReturn dependency property.
public : static DependencyProperty AcceptsReturnProperty { get; }public static DependencyProperty AcceptsReturnProperty { get; }Public Static ReadOnly Property AcceptsReturnProperty As DependencyProperty// This API is not available in Javascript.
The identifier for the AcceptsReturn dependency property.
CharacterCasing CharacterCasing CharacterCasing CharacterCasing
Prerelease. Gets or sets a value that indicates how the control modifies the case of characters as they are typed.
public : CharacterCasing CharacterCasing { get; set; }public CharacterCasing CharacterCasing { get; set; }Public ReadWrite Property CharacterCasing As CharacterCasing// This API is not available in Javascript.
<RichEditBox CharacterCasing="characterCasingValue"/>
A value of the enumeration that indicates how the control modifies the case of characters as they are typed. The default is Normal, which indicates that the charcters are not changed.
| Device family |
Windows 10 Insider Preview (introduced v10.0.16257.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v5)
|
Remarks
Note
This property modifies the case of characters as they are typed. It doesn’t modify characters that are entered in other ways, like paste or ink.
CharacterCasingProperty CharacterCasingProperty CharacterCasingProperty CharacterCasingProperty
Prerelease. Identifies the CharacterCasing dependency property.
public : static DependencyProperty CharacterCasingProperty { get; }public static DependencyProperty CharacterCasingProperty { get; }Public Static ReadOnly Property CharacterCasingProperty As DependencyProperty// This API is not available in Javascript.
The identifier for the CharacterCasing dependency property.
| Device family |
Windows 10 Insider Preview (introduced v10.0.16257.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v5)
|
ClipboardCopyFormat ClipboardCopyFormat ClipboardCopyFormat ClipboardCopyFormat
Gets or sets a value that specifies whether text is copied with all formats, or as plain text only.
public : RichEditClipboardFormat ClipboardCopyFormat { get; set; }public RichEditClipboardFormat ClipboardCopyFormat { get; set; }Public ReadWrite Property ClipboardCopyFormat As RichEditClipboardFormat// This API is not available in Javascript.
- Value
- RichEditClipboardFormat RichEditClipboardFormat RichEditClipboardFormat RichEditClipboardFormat
An enumeration value that specifies whether text is copied with all formats, or as plain text only. The default is AllFormats.
| Device family |
Windows 10 (introduced v10.0.10586.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v2)
|
Examples
<RichEditBox ClipboardCopyFormat="PlainText"/>
RichEditBox editBox1 = new RichEditBox();
editBox1.ClipboardCopyFormat = RichEditClipboardFormat.PlainText;
Remarks
By default, text copied from a RichEditBox is copied as both plain text and rich text. When the text is pasted into another app, the receiving app determines whether the plain text or rich text is used. To ensure that only plain text is pasted into a receiving app, set this property to PlainText to copy only plain text from the RichEditBox.
ClipboardCopyFormatProperty ClipboardCopyFormatProperty ClipboardCopyFormatProperty ClipboardCopyFormatProperty
Identifies the ClipboardCopyFormat dependency property.
public : static DependencyProperty ClipboardCopyFormatProperty { get; }public static DependencyProperty ClipboardCopyFormatProperty { get; }Public Static ReadOnly Property ClipboardCopyFormatProperty As DependencyProperty// This API is not available in Javascript.
The identifier for the ClipboardCopyFormat dependency property.
| Device family |
Windows 10 (introduced v10.0.10586.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v2)
|
DesiredCandidateWindowAlignment DesiredCandidateWindowAlignment DesiredCandidateWindowAlignment DesiredCandidateWindowAlignment
Gets or sets a value that indicates the preferred alignment of the Input Method Editor (IME).
public : CandidateWindowAlignment DesiredCandidateWindowAlignment { get; set; }public CandidateWindowAlignment DesiredCandidateWindowAlignment { get; set; }Public ReadWrite Property DesiredCandidateWindowAlignment As CandidateWindowAlignment// This API is not available in Javascript.
<RichEditBox DesiredCandidateWindowAlignment="candidateWindowAlignmentMemberName"/>
- Value
- CandidateWindowAlignment CandidateWindowAlignment CandidateWindowAlignment CandidateWindowAlignment
A value of the enumeration that indicates the preferred alignment of the Input Method Editor (IME). The default is Default.
Remarks
Users sometimes enter text through an Input Method Editor (IME) that shows in a window just below a text input box (typically for East Asian languages). The Input Method Editor (IME) window can cover important parts of your app UI that the user might need to see while entering text. Use the DesiredCandidateWindowAlignment property to specify a preferred placement of the Input Method Editor (IME) window in relation to the text input box.
By default, when the hardware keyboard is used, the Input Method Editor (IME) follows the cursor. You can set DesiredCandidateWindowAlignment to BottomEdge to align the Input Method Editor (IME) to the bottom edge and left side of the text edit control.
When the Soft Input Panel (SIP) is used, DesiredCandidateWindowAlignment doesn't have any effect. The Input Method Editor (IME) remains docked to the Soft Input Panel (SIP) whenever the Soft Input Panel (SIP) is used.
You can also handle the CandidateWindowBoundsChanged event to adapt your UI to the placement of the Input Method Editor (IME).
- See Also
DesiredCandidateWindowAlignmentProperty DesiredCandidateWindowAlignmentProperty DesiredCandidateWindowAlignmentProperty DesiredCandidateWindowAlignmentProperty
Identifies the DesiredCandidateWindowAlignment dependency property.
public : static DependencyProperty DesiredCandidateWindowAlignmentProperty { get; }public static DependencyProperty DesiredCandidateWindowAlignmentProperty { get; }Public Static ReadOnly Property DesiredCandidateWindowAlignmentProperty As DependencyProperty// This API is not available in Javascript.
The identifier for the DesiredCandidateWindowAlignment dependency property.
- See Also
DisabledFormattingAccelerators DisabledFormattingAccelerators DisabledFormattingAccelerators DisabledFormattingAccelerators
Prerelease. Gets or sets a value that indicates which keyboard shortcuts for formatting are disabled.
public : DisabledFormattingAccelerators DisabledFormattingAccelerators { get; set; }public DisabledFormattingAccelerators DisabledFormattingAccelerators { get; set; }Public ReadWrite Property DisabledFormattingAccelerators As DisabledFormattingAccelerators// This API is not available in Javascript.
<RichEditBox DisabledFormattingAccelerators="disabledFormattingAcceleratorsValue"/>
- Value
- DisabledFormattingAccelerators DisabledFormattingAccelerators DisabledFormattingAccelerators DisabledFormattingAccelerators
A value that indicates which keyboard shortcuts for formatting are disabled. The default is None.
| Device family |
Windows 10 Insider Preview (introduced v10.0.16257.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v5)
|
DisabledFormattingAcceleratorsProperty DisabledFormattingAcceleratorsProperty DisabledFormattingAcceleratorsProperty DisabledFormattingAcceleratorsProperty
Prerelease. Identifies the DisabledFormattingAccelerators dependency property.
public : static DependencyProperty DisabledFormattingAcceleratorsProperty { get; }public static DependencyProperty DisabledFormattingAcceleratorsProperty { get; }Public Static ReadOnly Property DisabledFormattingAcceleratorsProperty As DependencyProperty// This API is not available in Javascript.
The identifier for the DisabledFormattingAccelerators dependency property.
| Device family |
Windows 10 Insider Preview (introduced v10.0.16257.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v5)
|
Document Document Document Document
Gets an object that enables access to the text object model for the text contained in a RichEditBox.
public : ITextDocument Document { get; }public ITextDocument Document { get; }Public ReadOnly Property Document As ITextDocument// This API is not available in Javascript.
An object that enables access to the text object model.
Header Header Header Header
Gets or sets the content for the control's header.
public : PlatForm::Object Header { get; set; }public object Header { get; set; }Public ReadWrite Property Header As object// This API is not available in Javascript.
<RichEditBox Header="headerString"/>
- Value
- PlatForm::Object object object object
The content of the control's header. The default is null.
Remarks
You can set a data template for the Header by using the HeaderTemplate property.
- See Also
HeaderProperty HeaderProperty HeaderProperty HeaderProperty
Identifies the Header dependency property.
public : static DependencyProperty HeaderProperty { get; }public static DependencyProperty HeaderProperty { get; }Public Static ReadOnly Property HeaderProperty As DependencyProperty// This API is not available in Javascript.
The identifier for the Header dependency property.
HeaderTemplate HeaderTemplate HeaderTemplate HeaderTemplate
Gets or sets the DataTemplate used to display the content of the control's header.
public : DataTemplate HeaderTemplate { get; set; }public DataTemplate HeaderTemplate { get; set; }Public ReadWrite Property HeaderTemplate As DataTemplate// This API is not available in Javascript.
<RichEditBox>
<RichEditBox.HeaderTemplate>
singleDataTemplate
</RichEditBox.HeaderTemplate>
</RichEditBox>
The template that specifies the visualization of the header object. The default is null.
- See Also
HeaderTemplateProperty HeaderTemplateProperty HeaderTemplateProperty HeaderTemplateProperty
Identifies the HeaderTemplate dependency property.
public : static DependencyProperty HeaderTemplateProperty { get; }public static DependencyProperty HeaderTemplateProperty { get; }Public Static ReadOnly Property HeaderTemplateProperty As DependencyProperty// This API is not available in Javascript.
The identifier for the HeaderTemplate dependency property.
HorizontalTextAlignment HorizontalTextAlignment HorizontalTextAlignment HorizontalTextAlignment
Prerelease. Gets or sets a value that indicates how text is aligned in the RichEditBox.
public : TextAlignment HorizontalTextAlignment { get; set; }public TextAlignment HorizontalTextAlignment { get; set; }Public ReadWrite Property HorizontalTextAlignment As TextAlignment// This API is not available in Javascript.
<RichEditBox HorizontalTextAlignment="textAlignmentValue"/>
One of the TextAlignment enumeration values that specifies how text is aligned. The default is Left.
| Device family |
Windows 10 Insider Preview (introduced v10.0.16257.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v5)
|
Remarks
This property supports XAML Standard. It provides the same functionality as the TextAlignement property. If both properties are set to conflicting values, the last one set is used.
HorizontalTextAlignmentProperty HorizontalTextAlignmentProperty HorizontalTextAlignmentProperty HorizontalTextAlignmentProperty
Prerelease. Identifies the HorizontalTextAlignment dependency property.
public : static DependencyProperty HorizontalTextAlignmentProperty { get; }public static DependencyProperty HorizontalTextAlignmentProperty { get; }Public Static ReadOnly Property HorizontalTextAlignmentProperty As DependencyProperty// This API is not available in Javascript.
The identifier for the HorizontalTextAlignment dependency property.
| Device family |
Windows 10 Insider Preview (introduced v10.0.16257.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v5)
|
InputScope InputScope InputScope InputScope
Gets or sets the context for input used by this RichEditBox.
public : InputScope InputScope { get; set; }public InputScope InputScope { get; set; }Public ReadWrite Property InputScope As InputScope// This API is not available in Javascript.
<RichEditBox InputScope="inputScopeName" .../>
The input scope, which provides a hint at the type of text input expected by the control.
Examples
Here's how to set the InputScope in XAML and in code.
<RichEditBox InputScope="Formula"/>
RichEditBox editBox = new RichEditBox();
InputScope scope = new InputScope();
InputScopeName scopeName = new InputScopeName();
scopeName.NameValue = InputScopeNameValue.Formula;
scope.Names.Add(scopeName);
editBox.InputScope = scope;
Remarks
The input scope provides a hint at the type of text input expected by the control. Various elements of the system can respond to the hint provided by the input scope and provide a specialized UI for the input type. For example, the soft keyboard might show a number pad for text input when the control has its InputScope set to Number.
The control might also interpret the data being entered differently (typically for East Asian related input scopes). The input scope does not perform any validation, and does not prevent the user from providing any input through a hardware keyboard or other input device.
InputScopeProperty InputScopeProperty InputScopeProperty InputScopeProperty
Identifies the InputScope dependency property.
public : static DependencyProperty InputScopeProperty { get; }public static DependencyProperty InputScopeProperty { get; }Public Static ReadOnly Property InputScopeProperty As DependencyProperty// This API is not available in Javascript.
The identifier for the InputScope dependency property.
IsColorFontEnabled IsColorFontEnabled IsColorFontEnabled IsColorFontEnabled
Gets or sets a value that determines whether font glyphs that contain color layers, such as Segoe UI Emoji, are rendered in color.
public : PlatForm::Boolean IsColorFontEnabled { get; set; }public bool IsColorFontEnabled { get; set; }Public ReadWrite Property IsColorFontEnabled As bool// This API is not available in Javascript.
<RichEditBox IsColorFontEnabled="bool" />
- Value
- PlatForm::Boolean bool bool bool
true if color glyphs show in color; otherwise, false. The default is true.
Remarks
Windows 8.1 introduces the ability for fonts to include multiple colored layers for each glyph. For example, the Segoe UI Emoji font defines color versions of the Emoticon and other Emoji characters. By default, the IsColorFontEnabled property is true and fonts with these additional layers are rendered in color.
In Windows 8, Extensible Application Markup Language (XAML) text controls don't render multi-color fonts in color. When an app that was compiled for Windows 8 is recompiled for Windows 8.1, color rendering of multi-color fonts is enabled by default. Some glyphs in multi-color fonts have different layout metrics when rendered in color. This could cause different layout in apps when they are recompiled for Windows 8.1. To retain the Windows 8 behavior when your app is recompiled for Windows 8.1, set IsColorFontEnabled to false.
IsColorFontEnabledProperty IsColorFontEnabledProperty IsColorFontEnabledProperty IsColorFontEnabledProperty
Identifies the IsColorFontEnabled dependency property.
public : static DependencyProperty IsColorFontEnabledProperty { get; }public static DependencyProperty IsColorFontEnabledProperty { get; }Public Static ReadOnly Property IsColorFontEnabledProperty As DependencyProperty// This API is not available in Javascript.
The identifier for the IsColorFontEnabled dependency property.
IsReadOnly IsReadOnly IsReadOnly IsReadOnly
Gets or sets a value that indicates whether the user can change the text in the RichEditBox.
public : PlatForm::Boolean IsReadOnly { get; set; }public bool IsReadOnly { get; set; }Public ReadWrite Property IsReadOnly As bool// This API is not available in Javascript.
<RichEditBox IsReadOnly="bool"/>
- Value
- PlatForm::Boolean bool bool bool
True if the RichEditBox is read-only; otherwise, false. The default is false.
IsReadOnlyProperty IsReadOnlyProperty IsReadOnlyProperty IsReadOnlyProperty
Identifies the IsReadOnly dependency property.
public : static DependencyProperty IsReadOnlyProperty { get; }public static DependencyProperty IsReadOnlyProperty { get; }Public Static ReadOnly Property IsReadOnlyProperty As DependencyProperty// This API is not available in Javascript.
The identifier for the IsReadOnly dependency property.
IsSpellCheckEnabled IsSpellCheckEnabled IsSpellCheckEnabled IsSpellCheckEnabled
Gets or sets a value that indicates whether the text input should interact with a spell check engine.
public : PlatForm::Boolean IsSpellCheckEnabled { get; set; }public bool IsSpellCheckEnabled { get; set; }Public ReadWrite Property IsSpellCheckEnabled As bool// This API is not available in Javascript.
<RichEditBox IsSpellCheckEnabled="bool" />
- Value
- PlatForm::Boolean bool bool bool
True if the text input should interact with a spell check engine; otherwise, false. The default is true.
IsSpellCheckEnabledProperty IsSpellCheckEnabledProperty IsSpellCheckEnabledProperty IsSpellCheckEnabledProperty
Identifies the IsSpellCheckEnabled dependency property.
public : static DependencyProperty IsSpellCheckEnabledProperty { get; }public static DependencyProperty IsSpellCheckEnabledProperty { get; }Public Static ReadOnly Property IsSpellCheckEnabledProperty As DependencyProperty// This API is not available in Javascript.
The identifier for the IsSpellCheckEnabled dependency property.
IsTextPredictionEnabled IsTextPredictionEnabled IsTextPredictionEnabled IsTextPredictionEnabled
Gets or sets a value that indicates whether text prediction features ("autocomplete") are enabled for this RichEditBox.
public : PlatForm::Boolean IsTextPredictionEnabled { get; set; }public bool IsTextPredictionEnabled { get; set; }Public ReadWrite Property IsTextPredictionEnabled As bool// This API is not available in Javascript.
<RichEditBox IsTextPredictionEnabled="bool" />
- Value
- PlatForm::Boolean bool bool bool
True to enable text prediction features; otherwise, false. The default is true.
Remarks
This property doesn't affect Input Method Editor (IME) for Japanese or Chinese languages. Text prediction for these languages is shown even if this property is false.
IsTextPredictionEnabledProperty IsTextPredictionEnabledProperty IsTextPredictionEnabledProperty IsTextPredictionEnabledProperty
Identifies the IsTextPredictionEnabled dependency property.
public : static DependencyProperty IsTextPredictionEnabledProperty { get; }public static DependencyProperty IsTextPredictionEnabledProperty { get; }Public Static ReadOnly Property IsTextPredictionEnabledProperty As DependencyProperty// This API is not available in Javascript.
The identifier for the IsTextPredictionEnabled dependency property.
MaxLength MaxLength MaxLength MaxLength
Gets or sets the value that specifies the maximum number of characters allowed for user input.
public : int MaxLength { get; set; }public int MaxLength { get; set; }Public ReadWrite Property MaxLength As int// This API is not available in Javascript.
<RichEditBox MaxLength="int"/>
- Value
- int int int int
The maximum number of characters allowed for user input. The default is 0 (no limit).
| Device family |
Windows 10 Creators Update (introduced v10.0.15063.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v4)
|
Remarks
A MaxLength value of 0 specifies that there is no limit on the number of characters allowed for user input.
MaxLengthProperty MaxLengthProperty MaxLengthProperty MaxLengthProperty
Identifies the MaxLength dependency property.
public : static DependencyProperty MaxLengthProperty { get; }public static DependencyProperty MaxLengthProperty { get; }Public Static ReadOnly Property MaxLengthProperty As DependencyProperty// This API is not available in Javascript.
The identifier for the MaxLength dependency property.
| Device family |
Windows 10 Creators Update (introduced v10.0.15063.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v4)
|
PlaceholderText PlaceholderText PlaceholderText PlaceholderText
Gets or sets the text that is displayed in the control until the value is changed by a user action or some other operation.
public : PlatForm::String PlaceholderText { get; set; }public string PlaceholderText { get; set; }Public ReadWrite Property PlaceholderText As string// This API is not available in Javascript.
<RichEditBox PlaceholderText="placeholderString"/>
- Value
- PlatForm::String string string string
The text that is displayed in the control when no value is entered. The default is an empty string ("").
PlaceholderTextProperty PlaceholderTextProperty PlaceholderTextProperty PlaceholderTextProperty
Identifies the PlaceholderText dependency property.
public : static DependencyProperty PlaceholderTextProperty { get; }public static DependencyProperty PlaceholderTextProperty { get; }Public Static ReadOnly Property PlaceholderTextProperty As DependencyProperty// This API is not available in Javascript.
The identifier for the PlaceholderText dependency property.
PreventKeyboardDisplayOnProgrammaticFocus PreventKeyboardDisplayOnProgrammaticFocus PreventKeyboardDisplayOnProgrammaticFocus PreventKeyboardDisplayOnProgrammaticFocus
Gets or sets a value that indicates whether the on-screen keyboard is shown when the control receives focus programmatically.
public : PlatForm::Boolean PreventKeyboardDisplayOnProgrammaticFocus { get; set; }public bool PreventKeyboardDisplayOnProgrammaticFocus { get; set; }Public ReadWrite Property PreventKeyboardDisplayOnProgrammaticFocus As bool// This API is not available in Javascript.
<RichEditBox PreventKeyboardDisplayOnProgrammaticFocus="bool"/>
- Value
- PlatForm::Boolean bool bool bool
true if the on-screen keyboard is not shown when the control receives focus programmatically; otherwise, false. The default is false.
Remarks
Set this property to true to prevent the onscreen touch keyboard from showing when focus is programmatically set on a text box. By default, the onscreen touch keyboard is displayed whenever focus moves to an editable text box and the most recent input was generated by touch. This happens whether focus is set programmatically or by user interaction. In some situations, you might not want the keyboard to show when focus is set programmatically. For example, you might want to prevent the keyboard from covering part of your UI until the user is ready to continue their interaction.
PreventKeyboardDisplayOnProgrammaticFocusProperty PreventKeyboardDisplayOnProgrammaticFocusProperty PreventKeyboardDisplayOnProgrammaticFocusProperty PreventKeyboardDisplayOnProgrammaticFocusProperty
Identifies the PreventKeyboardDisplayOnProgrammaticFocus dependency property.
public : static DependencyProperty PreventKeyboardDisplayOnProgrammaticFocusProperty { get; }public static DependencyProperty PreventKeyboardDisplayOnProgrammaticFocusProperty { get; }Public Static ReadOnly Property PreventKeyboardDisplayOnProgrammaticFocusProperty As DependencyProperty// This API is not available in Javascript.
The identifier for the PreventKeyboardDisplayOnProgrammaticFocus dependency property.
SelectionHighlightColor SelectionHighlightColor SelectionHighlightColor SelectionHighlightColor
Gets or sets the brush used to highlight the selected text.
public : SolidColorBrush SelectionHighlightColor { get; set; }public SolidColorBrush SelectionHighlightColor { get; set; }Public ReadWrite Property SelectionHighlightColor As SolidColorBrush// This API is not available in Javascript.
<RichEditBox SelectionHighlightColor="{StaticResource resourceName}"/>
The brush used to highlight the selected text. The default is a null brush from a pure code perspective, but the default control template for RichEditBox applies a theme resource brush for this in a runtime instance of a RichEditBox control.
Remarks
The control template sets the default selection highlight color to the system resource TextSelectionHighlightColorThemeBrush. To change the selection highlight color for all editable text controls in your app, you can override the TextSelectionHighlightColorThemeBrush system resource in App.xaml. This will affect PasswordBox, TextBox, and RichEditBox controls. For more info, see XAML theme resources or RichEditBox styles and templates.
- See Also
SelectionHighlightColorProperty SelectionHighlightColorProperty SelectionHighlightColorProperty SelectionHighlightColorProperty
Identifies the SelectionHighlightColor dependency property.
public : static DependencyProperty SelectionHighlightColorProperty { get; }public static DependencyProperty SelectionHighlightColorProperty { get; }Public Static ReadOnly Property SelectionHighlightColorProperty As DependencyProperty// This API is not available in Javascript.
The identifier for the SelectionHighlightColor dependency property.
SelectionHighlightColorWhenNotFocused SelectionHighlightColorWhenNotFocused SelectionHighlightColorWhenNotFocused SelectionHighlightColorWhenNotFocused
Gets or sets the brush used to highlight the selected text when the RichEditBox does not have focus.
public : SolidColorBrush SelectionHighlightColorWhenNotFocused { get; set; }public SolidColorBrush SelectionHighlightColorWhenNotFocused { get; set; }Public ReadWrite Property SelectionHighlightColorWhenNotFocused As SolidColorBrush// This API is not available in Javascript.
<RichEditBox SelectionHighlightColorWhenNotFocused="{StaticResource resourceName}"/>
The brush used to highlight the selected text when RichEditBox loses focus. The default is a null brush from a pure code perspective, but the default control template for RichEditBox applies a Transparent brush for this in a runtime instance of a RichEditBox control. To disable the SelectionHighlightColorWhenNotFocused, set the brush to Transparent once again.
| Device family |
Windows 10 Creators Update (introduced v10.0.15063.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v4)
|
- See Also
SelectionHighlightColorWhenNotFocusedProperty SelectionHighlightColorWhenNotFocusedProperty SelectionHighlightColorWhenNotFocusedProperty SelectionHighlightColorWhenNotFocusedProperty
Identifies the SelectionHighlightColorWhenNotFocused dependency property.
public : static DependencyProperty SelectionHighlightColorWhenNotFocusedProperty { get; }public static DependencyProperty SelectionHighlightColorWhenNotFocusedProperty { get; }Public Static ReadOnly Property SelectionHighlightColorWhenNotFocusedProperty As DependencyProperty// This API is not available in Javascript.
The identifier for the SelectionHighlightColorWhenNotFocused dependency property.
| Device family |
Windows 10 Creators Update (introduced v10.0.15063.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v4)
|
TextAlignment TextAlignment TextAlignment TextAlignment
Gets or sets a value that indicates how text is aligned in the RichEditBox.
public : TextAlignment TextAlignment { get; set; }public TextAlignment TextAlignment { get; set; }Public ReadWrite Property TextAlignment As TextAlignment// This API is not available in Javascript.
<RichEditBox TextAlignment="textAlignmentValue"/>
One of the TextAlignment enumeration values that specifies how text is aligned. The default is Left.
TextAlignmentProperty TextAlignmentProperty TextAlignmentProperty TextAlignmentProperty
Identifies the TextAlignment dependency property.
public : static DependencyProperty TextAlignmentProperty { get; }public static DependencyProperty TextAlignmentProperty { get; }Public Static ReadOnly Property TextAlignmentProperty As DependencyProperty// This API is not available in Javascript.
Identifier for the TextAlignment dependency property.
TextReadingOrder TextReadingOrder TextReadingOrder TextReadingOrder
Gets or sets a value that indicates how the reading order is determined for the RichEditBox.
public : TextReadingOrder TextReadingOrder { get; set; }public TextReadingOrder TextReadingOrder { get; set; }Public ReadWrite Property TextReadingOrder As TextReadingOrder// This API is not available in Javascript.
<RichEditBox TextReadingOrder="textReadingOrderValue"/>
A value that indicates how the reading order is determined for the RichEditBox. The default is DetectFromContent.
Remarks
This property can be useful when the base direction of the text is unknown, and may not match the user's language or direction. For more info, see the Remarks section of the TextReadingOrder enumeration or How to support bidirectional UI.
- See Also
TextReadingOrderProperty TextReadingOrderProperty TextReadingOrderProperty TextReadingOrderProperty
Identifies the TextReadingOrder dependency property.
public : static DependencyProperty TextReadingOrderProperty { get; }public static DependencyProperty TextReadingOrderProperty { get; }Public Static ReadOnly Property TextReadingOrderProperty As DependencyProperty// This API is not available in Javascript.
The identifier for the TextReadingOrder dependency property.
- See Also
TextWrapping TextWrapping TextWrapping TextWrapping
Gets or sets a value that indicates how text wrapping occurs if a line of text extends beyond the available width of the RichEditBox.
public : TextWrapping TextWrapping { get; set; }public TextWrapping TextWrapping { get; set; }Public ReadWrite Property TextWrapping As TextWrapping// This API is not available in Javascript.
<RichEditBox TextWrapping="Wrap"/>
-or-
<RichEditBox TextWrapping="NoWrap"/>
One of the TextWrapping enumeration values that specifies whether text is wrapped. The default is Wrap.
Remarks
TextBox and RichEditBox don't support the WrapWholeWords value for their TextWrapping properties. If you try to use WrapWholeWords as a value for TextBox.TextWrapping or RichEditBox.TextWrapping an invalid argument exception is thrown.
TextWrappingProperty TextWrappingProperty TextWrappingProperty TextWrappingProperty
Identifies the TextWrapping dependency property.
public : static DependencyProperty TextWrappingProperty { get; }public static DependencyProperty TextWrappingProperty { get; }Public Static ReadOnly Property TextWrappingProperty As DependencyProperty// This API is not available in Javascript.
The identifier for the TextWrapping dependency property.
Methods
GetLinguisticAlternativesAsync() GetLinguisticAlternativesAsync() GetLinguisticAlternativesAsync() GetLinguisticAlternativesAsync()
Asynchronously gets a list of candidate words based on the provided phonetic characters in an Input Method Editor (IME).
public : IAsyncOperation<IVectorView<PlatForm::String>> GetLinguisticAlternativesAsync()public IAsyncOperation<IReadOnlyList<string>> GetLinguisticAlternativesAsync()Public Function GetLinguisticAlternativesAsync() As IAsyncOperation( Of IReadOnlyListstring )// This API is not available in Javascript.
A list of candidate words based on the provided phonetic characters in an Input Method Editor (IME).
| Device family |
Windows 10 (introduced v10.0.10586.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v2)
|
Events
CandidateWindowBoundsChanged CandidateWindowBoundsChanged CandidateWindowBoundsChanged CandidateWindowBoundsChanged
Occurs when the Input Method Editor (IME) window open, updates, or closes.
public : event TypedEventHandler CandidateWindowBoundsChanged<RichEditBox, CandidateWindowBoundsChangedEventArgs>public event TypedEventHandler CandidateWindowBoundsChanged<RichEditBox, CandidateWindowBoundsChangedEventArgs>Public Event CandidateWindowBoundsChanged<RichEditBox, CandidateWindowBoundsChangedEventArgs>// This API is not available in Javascript.
<RichEditBox CandidateWindowBoundsChanged="eventhandler" />
Examples
Here, a rectangle is placed below a RichEditBox. When the Input Method Editor (IME) window bounds change, the bottom Margin of the RichEditBox is increased by the height of the Input Method Editor (IME) candidate window. As a result, the rectangle is pushed down by that amount and is not covered by the candidate window.
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<StackPanel>
<RichEditBox x:Name="editBox1" Width="300" HorizontalAlignment="Left"
DesiredCandidateWindowAlignment="BottomEdge"
CandidateWindowBoundsChanged="OnCandidateWindowBoundsChanged"/>
<Rectangle Height="100" Width="100" Fill="Red"
HorizontalAlignment="Left"/>
</StackPanel>
</Grid>
private void OnCandidateWindowBoundsChanged(RichEditBox sender, CandidateWindowBoundsChangedEventArgs args)
{
editBox1.Margin = new Thickness
{
Left = 0,
Top = 0,
Right = 0,
Bottom = Math.Max(0, args.Bounds.Bottom - editBox1.ActualHeight)
};
}
Remarks
For event data, see CandidateWindowBoundsChangedEventArgs.
Users sometimes enter text through an Input Method Editor (IME) that shows in a window just below a text input box (typically for East Asian languages). The Input Method Editor (IME) window can cover important parts of your app UI that the user might need to see while entering text. This event notifies your app of the coordinates where the Input Method Editor (IME) window is currently displayed. You can use this info to draw your UI in a location that doesn't conflict with the Input Method Editor (IME) window.
You can also use the DesiredCandidateWindowAlignment property to specify a preferred placement of the Input Method Editor (IME) window in relation to the text input box.
- See Also
ContextMenuOpening ContextMenuOpening ContextMenuOpening ContextMenuOpening
Occurs when the system processes an interaction that displays a context menu.
public : event ContextMenuOpeningEventHandler ContextMenuOpeningpublic event ContextMenuOpeningEventHandler ContextMenuOpeningPublic Event ContextMenuOpening// This API is not available in Javascript.
<RichEditBox ContextMenuOpening="eventhandler" />
CopyingToClipboard CopyingToClipboard CopyingToClipboard CopyingToClipboard
Prerelease. Occurs before copied text is moved to the clipboard.
public : event TypedEventHandler CopyingToClipboard<RichEditBox, TextControlCopyingToClipboardEventArgs>public event TypedEventHandler CopyingToClipboard<RichEditBox, TextControlCopyingToClipboardEventArgs>Public Event CopyingToClipboard<RichEditBox, TextControlCopyingToClipboardEventArgs>// This API is not available in Javascript.
<RichEditBox CopyingToClipboard="eventhandler" />
| Device family |
Windows 10 Insider Preview (introduced v10.0.16257.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v5)
|
CuttingToClipboard CuttingToClipboard CuttingToClipboard CuttingToClipboard
Prerelease. Occurs before cut text is moved to the clipboard.
public : event TypedEventHandler CuttingToClipboard<RichEditBox, TextControlCuttingToClipboardEventArgs>public event TypedEventHandler CuttingToClipboard<RichEditBox, TextControlCuttingToClipboardEventArgs>Public Event CuttingToClipboard<RichEditBox, TextControlCuttingToClipboardEventArgs>// This API is not available in Javascript.
<RichEditBox CuttingToClipboard="eventhandler" />
| Device family |
Windows 10 Insider Preview (introduced v10.0.16257.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v5)
|
Paste Paste Paste Paste
Occurs when text is pasted into the control.
public : event TextControlPasteEventHandler Pastepublic event TextControlPasteEventHandler PastePublic Event Paste// This API is not available in Javascript.
<RichEditBox Paste="eventhandler"/>
Remarks
The Paste event occurs before any content is inserted into the control. You can handle this event to check the contents of the clipboard and perform any actions on the content before it's inserted. If you perform any action, set the handled property to true; otherwise, the default paste action is performed. If you set the handled property to true, then it's assumed the app has handled the insertion, and no default action is performed. You are responsible for determining the insertion point and clipboard content to insert, and inserting the content.
SelectionChanged SelectionChanged SelectionChanged SelectionChanged
Occurs when the text selection has changed.
public : event RoutedEventHandler SelectionChangedpublic event RoutedEventHandler SelectionChangedPublic Event SelectionChanged// This API is not available in Javascript.
<RichEditBox SelectionChanged="eventhandler"/>
TextChanged TextChanged TextChanged TextChanged
Occurs when content changes in the RichEditBox.
public : event RoutedEventHandler TextChangedpublic event RoutedEventHandler TextChangedPublic Event TextChanged// This API is not available in Javascript.
<RichEditBox TextChanged="eventhandler"/>
TextChanging TextChanging TextChanging TextChanging
Occurs synchronously when the text in the edit box starts to change, but before it is rendered.
public : event TypedEventHandler TextChanging<RichEditBox, RichEditBoxTextChangingEventArgs>public event TypedEventHandler TextChanging<RichEditBox, RichEditBoxTextChangingEventArgs>Public Event TextChanging<RichEditBox, RichEditBoxTextChangingEventArgs>// This API is not available in Javascript.
<RichEditBox TextChanging="eventhandler"/>
Remarks
For event data, see RichEditBoxTextChangingEventArgs.
The TextChanging event occurs synchronously before the new text is rendered. In contrast, the TextChanged event is asynchronous and occurs after the new text is rendered.
When the TextChanging event occurs, the Document property already reflects the new value (but it's not rendered in the UI). You typically handle this event to update the text value and selection before the text is rendered. This prevents the text flickering that can happen when text is rendered, updated, and re-rendered rapidly.
Note
This is a synchronous event that can occur at times when changes to the XAML visual tree are not allowed, such as during layout. Therefore, you should limit code within the TextChanging event handler primarily to inspecting and updating the Document property. Attempting to perform other actions, such as showing a popup or adding/removing elements from the visual tree, might cause potentially fatal errors that can lead to a crash. We recommend that you perform these other changes either in a TextChanged event handler, or run them as a separate asynchronous operation.
TextCompositionChanged TextCompositionChanged TextCompositionChanged TextCompositionChanged
Occurs when text being composed through an Input Method Editor (IME) changes.
public : event TypedEventHandler TextCompositionChanged<RichEditBox, TextCompositionChangedEventArgs>public event TypedEventHandler TextCompositionChanged<RichEditBox, TextCompositionChangedEventArgs>Public Event TextCompositionChanged<RichEditBox, TextCompositionChangedEventArgs>// This API is not available in Javascript.
<RichEditBox TextCompositionChanged="eventhandler"/>
Remarks
For event data, see TextCompositionChangedEventArgs.
This event occurs only when text is composed through an Input Method Editor (IME). Text composition events occur in the following order:
After the TextCompositionStarted event, the TextChanging > TextChanged > TextCompositionChanged event cycle can occur multiple times before the TextCompositionEnded event occurs.
- See Also
TextCompositionEnded TextCompositionEnded TextCompositionEnded TextCompositionEnded
Occurs when a user stops composing text through an Input Method Editor (IME).
public : event TypedEventHandler TextCompositionEnded<RichEditBox, TextCompositionEndedEventArgs>public event TypedEventHandler TextCompositionEnded<RichEditBox, TextCompositionEndedEventArgs>Public Event TextCompositionEnded<RichEditBox, TextCompositionEndedEventArgs>// This API is not available in Javascript.
<RichEditBox TextCompositionEnded="eventhandler"/>
Remarks
For event data, see TextCompositionEndedEventArgs.
This event occurs only when text is composed through an Input Method Editor (IME). Text composition events occur in the following order:
After the TextCompositionStarted event, the TextChanging > TextChanged > TextCompositionChanged event cycle can occur multiple times before the TextCompositionEnded event occurs.
- See Also
TextCompositionStarted TextCompositionStarted TextCompositionStarted TextCompositionStarted
Occurs when a user starts composing text through an Input Method Editor (IME).
public : event TypedEventHandler TextCompositionStarted<RichEditBox, TextCompositionStartedEventArgs>public event TypedEventHandler TextCompositionStarted<RichEditBox, TextCompositionStartedEventArgs>Public Event TextCompositionStarted<RichEditBox, TextCompositionStartedEventArgs>// This API is not available in Javascript.
<RichEditBox TextCompositionStarted="eventhandler"/>
Remarks
For event data, see TextCompositionStartedEventArgs.
This event occurs only when text is composed through an Input Method Editor (IME). Text composition events occur in the following order:
After the TextCompositionStarted event, the TextChanging > TextChanged > TextCompositionChanged event cycle can occur multiple times before the TextCompositionEnded event occurs.
- See Also