diff --git a/dotnet-desktop-guide/framework/wpf/advanced/staticresource-markup-extension.md b/dotnet-desktop-guide/framework/wpf/advanced/staticresource-markup-extension.md index be8fc4d..26830dc 100644 --- a/dotnet-desktop-guide/framework/wpf/advanced/staticresource-markup-extension.md +++ b/dotnet-desktop-guide/framework/wpf/advanced/staticresource-markup-extension.md @@ -2,6 +2,7 @@ title: "StaticResource Markup Extension" description: Provides a value for any XAML property attribute by looking up a reference to an already defined resource. ms.date: "03/30/2017" +ms.custom: devdivchpfy22 f1_keywords: - "StaticResource" - "StaticResourceExtension" @@ -31,8 +32,8 @@ Provides a value for any [!INCLUDE[TLA2#tla_xaml](../../../includes/tla2sharptla ## XAML Values -||| -|-|-| +| Value | Description | +|-------|-------------| |`key`|The key for the requested resource. This key was initially assigned by the [x:Key Directive](/dotnet/desktop/xaml-services/xkey-directive) if a resource was created in markup, or was provided as the `key` parameter when calling if the resource was created in code.| ## Remarks diff --git a/dotnet-desktop-guide/framework/wpf/advanced/templatebinding-markup-extension.md b/dotnet-desktop-guide/framework/wpf/advanced/templatebinding-markup-extension.md index 435b37a..d765b41 100644 --- a/dotnet-desktop-guide/framework/wpf/advanced/templatebinding-markup-extension.md +++ b/dotnet-desktop-guide/framework/wpf/advanced/templatebinding-markup-extension.md @@ -1,6 +1,8 @@ --- title: "TemplateBinding Markup Extension" ms.date: "03/30/2017" +ms.custom: devdivchpfy22 +description: Learn about the TemplateBinding Markup Extension. f1_keywords: - "TemplateBinding" - "TemplateBindingExtension" @@ -26,8 +28,8 @@ Links the value of a property in a control template to be the value of another p ## XAML Values -||| -|-|-| +| Value | Description | +|-------|-------------| |`propertyName`| of the property being set in the setter syntax.| |`sourceProperty`|Another dependency property that exists on the type being templated, specified by its .

- or -

A "dotted-down" property name that is defined by a different type than the target type being templated. This is actually a . See [PropertyPath XAML Syntax](propertypath-xaml-syntax.md).| diff --git a/dotnet-desktop-guide/framework/wpf/advanced/themedictionary-markup-extension.md b/dotnet-desktop-guide/framework/wpf/advanced/themedictionary-markup-extension.md index ae782f6..ddb00c2 100644 --- a/dotnet-desktop-guide/framework/wpf/advanced/themedictionary-markup-extension.md +++ b/dotnet-desktop-guide/framework/wpf/advanced/themedictionary-markup-extension.md @@ -1,6 +1,8 @@ --- title: "ThemeDictionary Markup Extension" ms.date: "03/30/2017" +ms.custom: devdivchpfy22 +description: Learn about the ThemeDictionary Markup Extension. f1_keywords: - "ThemeDictionaryExtension" - "ThemeDictionary" @@ -30,8 +32,8 @@ Provides a way for custom control authors or applications that integrate third-p ## XAML Values -||| -|-|-| +| Value | Description | +|-------|-------------| |`assemblyUri`|The uniform resource identifier (URI) of the assembly that contains theme information. Typically, this is a pack URI that references an assembly in the larger package. Assembly resources and pack URIs simplify deployment issues. For more information see [Pack URIs in WPF](../app-development/pack-uris-in-wpf.md).| ## Remarks diff --git a/dotnet-desktop-guide/framework/wpf/advanced/typography-in-wpf.md b/dotnet-desktop-guide/framework/wpf/advanced/typography-in-wpf.md index a7641b5..5d536ec 100644 --- a/dotnet-desktop-guide/framework/wpf/advanced/typography-in-wpf.md +++ b/dotnet-desktop-guide/framework/wpf/advanced/typography-in-wpf.md @@ -1,6 +1,8 @@ --- -title: "Typography" +title: "Typography in WPF" ms.date: "03/30/2017" +ms.custom: devdivchpfy22 +description: Learn about the typography in WPF. helpviewer_keywords: - "typography [WPF], about typography" ms.assetid: 06cbf17b-6eff-4fe5-949d-2dd533e4e1f4 diff --git a/dotnet-desktop-guide/framework/wpf/advanced/typography.md b/dotnet-desktop-guide/framework/wpf/advanced/typography.md index 933537d..5603587 100644 --- a/dotnet-desktop-guide/framework/wpf/advanced/typography.md +++ b/dotnet-desktop-guide/framework/wpf/advanced/typography.md @@ -1,6 +1,8 @@ --- title: "Typography" ms.date: "03/30/2017" +ms.custom: devdivchpfy22 +description: Learn about the typography. f1_keywords: - "AutoGeneratedOrientationPage" helpviewer_keywords: diff --git a/dotnet-desktop-guide/framework/wpf/advanced/xaml-syntax-in-detail.md b/dotnet-desktop-guide/framework/wpf/advanced/xaml-syntax-in-detail.md index 3d30cea..0c4db30 100644 --- a/dotnet-desktop-guide/framework/wpf/advanced/xaml-syntax-in-detail.md +++ b/dotnet-desktop-guide/framework/wpf/advanced/xaml-syntax-in-detail.md @@ -2,6 +2,7 @@ title: "XAML Syntax In Detail" description: Learn about terms that are used to describe the elements of XAML syntax for Windows Presentation Foundation and other frameworks that use XAML. ms.date: "03/30/2017" +ms.custom: devdivchpfy22 ms.topic: overview helpviewer_keywords: - "XML [WPF], namespaces" @@ -273,8 +274,8 @@ This topic defines the terms that are used to describe the elements of XAML synt ## Anatomy of a XAML Root Element The following table shows a typical XAML root element broken down, showing the specific attributes of a root element: -||| -|-|-| +| Attribute | Description | +|-----------|-------------| |`|An abstract base class from which all concrete adorner implementations inherit.| ||A class representing a rendering layer for the adorner(s) of one or more adorned elements.| ||A class that enables an adorner layer to be associated with a collection of elements.| diff --git a/dotnet-desktop-guide/framework/wpf/controls/change-selection-in-a-richtextbox-programmatically.md b/dotnet-desktop-guide/framework/wpf/controls/change-selection-in-a-richtextbox-programmatically.md index bf051f8..cc31b1e 100644 --- a/dotnet-desktop-guide/framework/wpf/controls/change-selection-in-a-richtextbox-programmatically.md +++ b/dotnet-desktop-guide/framework/wpf/controls/change-selection-in-a-richtextbox-programmatically.md @@ -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 . 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 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 . [!code-csharp[RichTextBoxMiscSnippets_snip#ChangeSelectionProgrammaticalyCodeExampleWholePage](~/samples/snippets/csharp/VS_Snippets_Wpf/RichTextBoxMiscSnippets_snip/CSharp/ChangeSelectionProgrammaticaly.xaml.cs#changeselectionprogrammaticalycodeexamplewholepage)] diff --git a/dotnet-desktop-guide/framework/wpf/controls/gridview-column-header-styles-and-templates-overview.md b/dotnet-desktop-guide/framework/wpf/controls/gridview-column-header-styles-and-templates-overview.md index cc67d0a..3020746 100644 --- a/dotnet-desktop-guide/framework/wpf/controls/gridview-column-header-styles-and-templates-overview.md +++ b/dotnet-desktop-guide/framework/wpf/controls/gridview-column-header-styles-and-templates-overview.md @@ -1,6 +1,8 @@ --- title: "GridView Column Header Styles and Templates Overview" ms.date: "03/30/2017" +ms.custom: devdivchpfy22 +description: Learn about the GridView column header styles and templates. helpviewer_keywords: - "column headers [WPF], customizing" - "ListView controls [WPF], GridView column header styles" @@ -19,9 +21,8 @@ This overview discusses the order of precedence for properties that you use to c **Related properties for column headers in a GridView** -||||| +| | | || |-|-|-|-| -|**Classes**|||| |**Context Menu Properties**||Not applicable|| |**ToolTip**

**Properties**||Not applicable|| |**Header Template**

**Properties**| 1/

| 1/

| 1/

| diff --git a/dotnet-desktop-guide/framework/wpf/controls/how-to-create-apply-template.md b/dotnet-desktop-guide/framework/wpf/controls/how-to-create-apply-template.md index b64ce4c..cdf721c 100644 --- a/dotnet-desktop-guide/framework/wpf/controls/how-to-create-apply-template.md +++ b/dotnet-desktop-guide/framework/wpf/controls/how-to-create-apply-template.md @@ -4,6 +4,7 @@ description: Learn how to create and reference a control template in Windows Pre author: adegeo ms.author: adegeo ms.date: 12/03/2020 +ms.custom: devdivchpfy22 no-loc: ["", "", "", "", "", "", "", "", "", "", "", "", "SizeToContent", "MinWidth", "TargetType", "Title"] ms.topic: how-to helpviewer_keywords: @@ -35,11 +36,11 @@ On the other hand, if you need a control with new functionality, different prope Create a new WPF application and in *MainWindow.xaml* (or another window of your choice) set the following properties on the **\** element: -| | | -| --- | --- | +| Property | Value | +|----------|-------| | **Title** | `Template Intro Sample` | | **SizeToContent** | `WidthAndHeight` | -| **MinWidth** | `250` | +| **MinWidth** | `250` | Set the content of the **\** element to the following XAML: @@ -63,10 +64,10 @@ To start with, add a `Window.Resources` element to your *MainWindow.xaml* file: Create a new **\** with the following properties set: -| | | -| --- | --- | -| **x:Key** | `roundbutton` | -| **TargetType** | `Button` | +| Property | Value | +| ----- | ---------- | +| **x:Key** | `roundbutton` | +| **TargetType** | `Button` | This control template will be simple: diff --git a/dotnet-desktop-guide/framework/wpf/controls/how-to-customize-the-thumb-size-on-a-scrollbar.md b/dotnet-desktop-guide/framework/wpf/controls/how-to-customize-the-thumb-size-on-a-scrollbar.md index c14141b..80ad66f 100644 --- a/dotnet-desktop-guide/framework/wpf/controls/how-to-customize-the-thumb-size-on-a-scrollbar.md +++ b/dotnet-desktop-guide/framework/wpf/controls/how-to-customize-the-thumb-size-on-a-scrollbar.md @@ -1,6 +1,8 @@ --- title: "How to: Customize the Thumb Size on a ScrollBar" +description: Learn how to customize the Thumb Size on a ScrollBar. ms.date: "03/30/2017" +ms.custom: devdivchpfy22 helpviewer_keywords: - "ScrollBar control [WPF]" - "customizing thumb size [WPF]" @@ -10,18 +12,14 @@ ms.assetid: fa32b866-5ca1-4e73-85e7-2ac64b80d194 # How to: Customize the Thumb Size on a ScrollBar This topic explains how to set the of a to a fixed size and how to specify a minimum size for the of a . -## Example - -## Description +## Create a ScrollBar with a fixed Thumb size The following example creates a that has a with a fixed size. The example sets the property of the to and sets the height of the . To create a horizontal with a that has a fixed width, set the width of the . -## Code [!code-xaml[ScrollBarCustomThumbSize#1](~/samples/snippets/csharp/VS_Snippets_Wpf/ScrollBarCustomThumbSize/CS/Window1.xaml#1)] -## Description +## Create a ScrollBar with a minimum Thumb size The following example creates a that has a with a minimum size. The example sets the value of . To create a horizontal with a that has a minimum width, set the . -## Code [!code-xaml[ScrollBarCustomThumbSize#2](~/samples/snippets/csharp/VS_Snippets_Wpf/ScrollBarCustomThumbSize/CS/Window1.xaml#2)] ## See also diff --git a/dotnet-desktop-guide/framework/wpf/controls/how-to-detect-when-text-in-a-textbox-has-changed.md b/dotnet-desktop-guide/framework/wpf/controls/how-to-detect-when-text-in-a-textbox-has-changed.md index 65900cd..518ab98 100644 --- a/dotnet-desktop-guide/framework/wpf/controls/how-to-detect-when-text-in-a-textbox-has-changed.md +++ b/dotnet-desktop-guide/framework/wpf/controls/how-to-detect-when-text-in-a-textbox-has-changed.md @@ -2,6 +2,7 @@ title: "How to: Detect When Text in a TextBox Has Changed" description: Learn how to use the TextChanged event to run a method whenever the text in a TextBox control changes in a Windows Presentation Foundation application. ms.date: "03/30/2017" +ms.custom: devdivchpfy22 dev_langs: - "csharp" - "vb" @@ -22,13 +23,13 @@ The event handler is called whenever the contents of the [!NOTE] > This event fires when the control is created and initially populated with text. -## Example +## Define TextBox control In the [!INCLUDE[TLA#tla_xaml](../../../includes/tlasharptla-xaml-md.md)] that defines your control, specify the attribute with a value that matches the event handler method name. [!code-xaml[TextBox_MiscCode#_TextChangedXAML](~/samples/snippets/csharp/VS_Snippets_Wpf/TextBox_MiscCode/CSharp/Window1.xaml#_textchangedxaml)] -## Example +## Monitor the TextBox control changes In the code-behind class for the [!INCLUDE[TLA2#tla_xaml](../../../includes/tla2sharptla-xaml-md.md)] that contains the control that you want to monitor for changes, insert a method to call whenever the event fires. This method must have a signature that matches what is expected by the delegate. diff --git a/dotnet-desktop-guide/framework/wpf/controls/how-to-extract-the-text-content-from-a-richtextbox.md b/dotnet-desktop-guide/framework/wpf/controls/how-to-extract-the-text-content-from-a-richtextbox.md index f94a846..d3e5a8e 100644 --- a/dotnet-desktop-guide/framework/wpf/controls/how-to-extract-the-text-content-from-a-richtextbox.md +++ b/dotnet-desktop-guide/framework/wpf/controls/how-to-extract-the-text-content-from-a-richtextbox.md @@ -1,6 +1,8 @@ --- title: "How to: Extract the Text Content from a RichTextBox" +description: Learn how to extract the Text Content from a RichTextBox. ms.date: "03/30/2017" +ms.custom: devdivchpfy22 dev_langs: - "csharp" - "vb" @@ -14,12 +16,12 @@ ms.assetid: f13c093f-1a05-45b3-ac8f-c9ea5e4a11c5 # How to: Extract the Text Content from a RichTextBox This example shows how to extract the contents of a as plain text. -## Example +## Describe a RichTextBox control The following [!INCLUDE[TLA#tla_xaml](../../../includes/tlasharptla-xaml-md.md)] code describes a named control with simple content. [!code-xaml[RichTextBoxSnippets#_RTB_XAML](~/samples/snippets/csharp/VS_Snippets_Wpf/RichTextBoxSnippets/CSharp/Window1.xaml#_rtb_xaml)] -## Example +## Code example with RichTextBox as an argument The following code implements a method that takes a as an argument, and returns a string representing the plain text contents of the . The method creates a new from the contents of the , using the and to indicate the range of the contents to extract. and properties each return a , and are accessible on the underlying FlowDocument that represents the contents of the . provides a Text property, which returns the plain text portions of the as a string. diff --git a/dotnet-desktop-guide/framework/wpf/controls/how-to-position-a-custom-context-menu-in-a-richtextbox.md b/dotnet-desktop-guide/framework/wpf/controls/how-to-position-a-custom-context-menu-in-a-richtextbox.md index fb8e261..85c0268 100644 --- a/dotnet-desktop-guide/framework/wpf/controls/how-to-position-a-custom-context-menu-in-a-richtextbox.md +++ b/dotnet-desktop-guide/framework/wpf/controls/how-to-position-a-custom-context-menu-in-a-richtextbox.md @@ -1,6 +1,8 @@ --- title: "How to: Position a Custom Context Menu in a RichTextBox" ms.date: "03/30/2017" +ms.custom: devdivchpfy22 +description: Learn how to position a Custom Context Menu in a RichTextBox. dev_langs: - "csharp" - "vb" @@ -16,13 +18,13 @@ This example shows how to position a custom context menu for a event. The following example shows how to do this programmatically. [!code-csharp[RichTextBox_ContextMenu#_AddListener](~/samples/snippets/csharp/VS_Snippets_Wpf/RichTextBox_ContextMenu/CSharp/app.xaml.cs#_addlistener)] [!code-vb[RichTextBox_ContextMenu#_AddListener](~/samples/snippets/visualbasic/VS_Snippets_Wpf/RichTextBox_ContextMenu/VisualBasic/app.xaml.vb#_addlistener)] -## Example +## Implementation of ContextMenuOpening event listener The following example shows an implementation the corresponding event listener. [!code-csharp[RichTextBox_ContextMenu#_ListenerBody](~/samples/snippets/csharp/VS_Snippets_Wpf/RichTextBox_ContextMenu/CSharp/app.xaml.cs#_listenerbody)] diff --git a/dotnet-desktop-guide/framework/wpf/controls/how-to-remove-all-adorners-from-an-element.md b/dotnet-desktop-guide/framework/wpf/controls/how-to-remove-all-adorners-from-an-element.md index 9dd2019..1dfd9f3 100644 --- a/dotnet-desktop-guide/framework/wpf/controls/how-to-remove-all-adorners-from-an-element.md +++ b/dotnet-desktop-guide/framework/wpf/controls/how-to-remove-all-adorners-from-an-element.md @@ -1,6 +1,8 @@ --- title: "How to: Remove all Adorners from an Element" ms.date: "03/30/2017" +ms.custom: devdivchpfy22 +description: Learn how to remove all Adorners from an Element. dev_langs: - "csharp" - "vb" @@ -11,13 +13,13 @@ ms.assetid: fe5303a3-b76e-4643-aafb-51419032b47b # How to: Remove all Adorners from an Element This example shows how to programmatically remove all adorners from a specified . -## Example +## Retrieve the adorners on a UIElement This verbose code example removes all of the adorners in the array of adorners returned by . This example happens to retrieve the adorners on a named *myTextBox*. If the element specified in the call to has no adorners, `null` is returned. This code explicitly checks for a null array, and is best suited for applications where a null array is expected to be relatively common. [!code-csharp[AdornersMiscCode#_RemoveAllAdornersLong](~/samples/snippets/csharp/VS_Snippets_Wpf/AdornersMiscCode/CSharp/Window1.xaml.cs#_removealladornerslong)] [!code-vb[AdornersMiscCode#_RemoveAllAdornersLong](~/samples/snippets/visualbasic/VS_Snippets_Wpf/AdornersMiscCode/visualbasic/window1.xaml.vb#_removealladornerslong)] -## Example +## Code example This condensed code example is functionally equivalent to the verbose example shown above. This code does not explicitly check for a null array, so it is possible that a exception may be raised. This code is best suited for applications where a null array is expected to be rare. [!code-csharp[AdornersMiscCode#_RemoveAllAdornersShort](~/samples/snippets/csharp/VS_Snippets_Wpf/AdornersMiscCode/CSharp/Window1.xaml.cs#_removealladornersshort)] diff --git a/dotnet-desktop-guide/framework/wpf/controls/how-to-remove-an-adorner-from-an-element.md b/dotnet-desktop-guide/framework/wpf/controls/how-to-remove-an-adorner-from-an-element.md index 6f415aa..6edcf57 100644 --- a/dotnet-desktop-guide/framework/wpf/controls/how-to-remove-an-adorner-from-an-element.md +++ b/dotnet-desktop-guide/framework/wpf/controls/how-to-remove-an-adorner-from-an-element.md @@ -1,6 +1,8 @@ --- title: "How to: Remove an Adorner from an Element" ms.date: "03/30/2017" +ms.custom: devdivchpfy22 +description: Learn how to remove an Adorner from an Element. dev_langs: - "csharp" - "vb" @@ -11,7 +13,7 @@ ms.assetid: 97cf4d9f-0596-429e-8526-32a30aa4ae99 # How to: Remove an Adorner from an Element This example shows how to programmatically remove a specific adorner from a specified . -## Example +## Retrieve an adorner on a UIElement This verbose code example removes the first adorner in the array of adorners returned by . This example happens to retrieve the adorners on a named *myTextBox*. If the element specified in the call to has no adorners, `null` is returned. This code explicitly checks for a null array, and is best suited for applications where a null array is expected to be relatively common. [!code-csharp[AdornersMiscCode#_RemoveSpecificAdornerLong](~/samples/snippets/csharp/VS_Snippets_Wpf/AdornersMiscCode/CSharp/Window1.xaml.cs#_removespecificadornerlong)] diff --git a/dotnet-desktop-guide/framework/wpf/controls/how-to-retrieve-a-text-selection.md b/dotnet-desktop-guide/framework/wpf/controls/how-to-retrieve-a-text-selection.md index 88387a0..38ae3f5 100644 --- a/dotnet-desktop-guide/framework/wpf/controls/how-to-retrieve-a-text-selection.md +++ b/dotnet-desktop-guide/framework/wpf/controls/how-to-retrieve-a-text-selection.md @@ -1,6 +1,8 @@ --- title: "How to: Retrieve a Text Selection" ms.date: "03/30/2017" +ms.custom: devdivchpfy22 +description: Learn how to retrieve a Text selection. dev_langs: - "csharp" - "vb" @@ -13,14 +15,14 @@ ms.assetid: d5793172-1e11-4a39-9be0-73f336ed858d # How to: Retrieve a Text Selection This example shows one way to use the property to retrieve text that the user has selected in a control. -## Example +## Define a TextBox control The following [!INCLUDE[TLA#tla_xaml](../../../includes/tlasharptla-xaml-md.md)] example shows the definition of a control that contains some text to select, and a control with a specified method. In this example, a button with an associated event handler is used to retrieve the text selection. When the user clicks the button, the method copies any selected text in the textbox into a string. The particular circumstances by which the text selection is retrieved (clicking a button), as well as the action taken with that selection (copying the text selection to a string), can easily be modified to accommodate a wide variety of scenarios. [!code-xaml[TextBox_MiscCode#_TextBoxSelectTextXAML](~/samples/snippets/csharp/VS_Snippets_Wpf/TextBox_MiscCode/CSharp/Window1.xaml#_textboxselecttextxaml)] -## Example +## OnClick event handler The following C# example shows an event handler for the button defined in the [!INCLUDE[TLA2#tla_xaml](../../../includes/tla2sharptla-xaml-md.md)] for this example. [!code-csharp[TextBox_MiscCode#_SelectText](~/samples/snippets/csharp/VS_Snippets_Wpf/TextBox_MiscCode/CSharp/Window1.xaml.cs#_selecttext)] diff --git a/dotnet-desktop-guide/framework/wpf/controls/how-to-save-load-and-print-richtextbox-content.md b/dotnet-desktop-guide/framework/wpf/controls/how-to-save-load-and-print-richtextbox-content.md index 8d77f41..9efc734 100644 --- a/dotnet-desktop-guide/framework/wpf/controls/how-to-save-load-and-print-richtextbox-content.md +++ b/dotnet-desktop-guide/framework/wpf/controls/how-to-save-load-and-print-richtextbox-content.md @@ -1,6 +1,8 @@ --- title: "How to: Save, Load, and Print RichTextBox Content" ms.date: "03/30/2017" +ms.custom: devdivchpfy22 +description: Learn how to Save, Load, and Print RichTextBox content. dev_langs: - "csharp" - "vb" @@ -16,12 +18,12 @@ ms.assetid: ffb113d3-c68a-47ca-8ac0-882283f38326 # How to: Save, Load, and Print RichTextBox Content The following example shows how to save content of a to a file, load that content back into the , and print the contents. -## Example +## Markup for Save, Load, and Print RichTextBox Content Below is the markup for the example. [!code-xaml[RichTextBoxMiscSnippets_snip#SaveLoadPrintRTBExampleWholePage](~/samples/snippets/csharp/VS_Snippets_Wpf/RichTextBoxMiscSnippets_snip/CSharp/SaveLoadPrintRTB.xaml#saveloadprintrtbexamplewholepage)] -## Example +## Code for Save, Load, and Print RichTextBox Content Below is the code behind for the example. [!code-csharp[RichTextBoxMiscSnippets_snip#SaveLoadPrintRTBCodeExampleWholePage](~/samples/snippets/csharp/VS_Snippets_Wpf/RichTextBoxMiscSnippets_snip/CSharp/SaveLoadPrintRTB.xaml.cs#saveloadprintrtbcodeexamplewholepage)] diff --git a/dotnet-desktop-guide/framework/wpf/controls/how-to-set-focus-in-a-textbox-control.md b/dotnet-desktop-guide/framework/wpf/controls/how-to-set-focus-in-a-textbox-control.md index 56fbced..5692495 100644 --- a/dotnet-desktop-guide/framework/wpf/controls/how-to-set-focus-in-a-textbox-control.md +++ b/dotnet-desktop-guide/framework/wpf/controls/how-to-set-focus-in-a-textbox-control.md @@ -2,6 +2,7 @@ title: "How to: Set Focus in a TextBox Control" description: Learn how to use the Focus method to set focus on a Windows Presentation Foundation TextBox control. ms.date: "03/30/2017" +ms.custom: devdivchpfy22 dev_langs: - "csharp" - "vb" @@ -13,12 +14,12 @@ ms.assetid: 24b61b45-dc2d-425e-9839-b017af7ab86f # How to: Set Focus in a TextBox Control This example shows how to use the method to set focus on a control. -## Example +## Define a simple TextBox control The following [!INCLUDE[TLA#tla_xaml](../../../includes/tlasharptla-xaml-md.md)] example describes a simple control named *tbFocusMe* [!code-xaml[TextBox_MiscCode#_TextBoxFocusXAML](~/samples/snippets/csharp/VS_Snippets_Wpf/TextBox_MiscCode/CSharp/Window1.xaml#_textboxfocusxaml)] -## Example +## Set the focus on the TextBox control The following example calls the method to set the focus on the control with the Name *tbFocusMe*. [!code-csharp[TextBox_MiscCode#_FocusTextBox](~/samples/snippets/csharp/VS_Snippets_Wpf/TextBox_MiscCode/CSharp/Window1.xaml.cs#_focustextbox)] diff --git a/dotnet-desktop-guide/framework/wpf/controls/how-to-set-the-text-content-of-a-textbox-control.md b/dotnet-desktop-guide/framework/wpf/controls/how-to-set-the-text-content-of-a-textbox-control.md index 47b50f0..964c62f 100644 --- a/dotnet-desktop-guide/framework/wpf/controls/how-to-set-the-text-content-of-a-textbox-control.md +++ b/dotnet-desktop-guide/framework/wpf/controls/how-to-set-the-text-content-of-a-textbox-control.md @@ -2,6 +2,7 @@ title: "How to: Set the Text Content of a TextBox Control" description: Learn how to use the Text property to set the initial text contents of a Windows Presentation Foundation TextBox control. ms.date: "03/30/2017" +ms.custom: devdivchpfy22 dev_langs: - "csharp" - "vb" @@ -17,11 +18,11 @@ This example shows how to use the > [!NOTE] > Although the [!INCLUDE[TLA#tla_xaml](../../../includes/tlasharptla-xaml-md.md)] version of the example could use the `` tags around the text of each button's content, it is not necessary because the applies the attribute to the property. For more information, see [XAML in WPF](../advanced/xaml-in-wpf.md). -## Example +## Use the Text property to set the text contents [!code-xaml[TextBox_MiscCode#_TextBoxSetTextXAML](~/samples/snippets/csharp/VS_Snippets_Wpf/TextBox_MiscCode/CSharp/Window1.xaml#_textboxsettextxaml)] -## Example +## Set the Text Content of a TextBox Control [!code-csharp[TextBox_MiscCode#_TextBoxSetText](~/samples/snippets/csharp/VS_Snippets_Wpf/TextBox_MiscCode/CSharp/Window1.xaml.cs#_textboxsettext)] [!code-vb[TextBox_MiscCode#_TextBoxSetText](~/samples/snippets/visualbasic/VS_Snippets_Wpf/TextBox_MiscCode/VisualBasic/Window1.xaml.vb#_textboxsettext)]