mirror of
https://github.com/Stone-Red-Code/docs-desktop.git
synced 2026-09-07 07:56:07 +02:00
US-1889327: Header fixes (#1319)
* Metadata updates for US-1889327. * H2 edits. * Updated column header. * Minor edits. * Review edits.
This commit is contained in:
+4
-2
@@ -1,6 +1,8 @@
|
||||
---
|
||||
title: "Change Selection in a RichTextBox Programmatically"
|
||||
ms.date: "03/30/2017"
|
||||
ms.custom: devdivchpfy22
|
||||
description: Learn how to change selection in a RichTextBox programmatically.
|
||||
dev_langs:
|
||||
- "csharp"
|
||||
- "vb"
|
||||
@@ -12,12 +14,12 @@ ms.assetid: f1213205-1ad7-4cd2-b115-460173cc5aa3
|
||||
# Change Selection in a RichTextBox Programmatically
|
||||
This example shows how to programmatically change the current selection in a <xref:System.Windows.Controls.RichTextBox>. This selection is the same as if the user had selected the content by using the user interface.
|
||||
|
||||
## Example
|
||||
## Code example for a RichTextBox control
|
||||
The following [!INCLUDE[TLA#tla_xaml](../../../includes/tlasharptla-xaml-md.md)] code describes a named <xref:System.Windows.Controls.RichTextBox> control with simple content.
|
||||
|
||||
[!code-xaml[RichTextBoxMiscSnippets_snip#ChangeSelectionProgrammaticalyExampleWholePage](~/samples/snippets/csharp/VS_Snippets_Wpf/RichTextBoxMiscSnippets_snip/CSharp/ChangeSelectionProgrammaticaly.xaml#changeselectionprogrammaticalyexamplewholepage)]
|
||||
|
||||
## Example
|
||||
## Code example to select text from a RichTextBox
|
||||
The following code programmatically selects some arbitrary text when the user clicks inside the <xref:System.Windows.Controls.RichTextBox>.
|
||||
|
||||
[!code-csharp[RichTextBoxMiscSnippets_snip#ChangeSelectionProgrammaticalyCodeExampleWholePage](~/samples/snippets/csharp/VS_Snippets_Wpf/RichTextBoxMiscSnippets_snip/CSharp/ChangeSelectionProgrammaticaly.xaml.cs#changeselectionprogrammaticalycodeexamplewholepage)]
|
||||
|
||||
Reference in New Issue
Block a user