From 52db914f5eef18cdc674ca05a03ed41cc9c5d6e4 Mon Sep 17 00:00:00 2001 From: "Andy (Steve) De George" <67293991+adegeo@users.noreply.github.com> Date: Wed, 9 Aug 2023 16:11:26 -0700 Subject: [PATCH] Restore bad includes find/replace items from WPF (#1688) * checkpoint 1 * checkpoint 2 * checkpoint whatever * checkpoint whoopsie * checkin or checkout?? * final! * Update object-lifetime-events.md * Update wpf-globalization-and-localization-overview.md * Update 3-d-graphics-overview.md --- .../bidirectional-features-in-wpf-overview.md | 2 +- .../wpf/advanced/code-behind-and-xaml-in-wpf.md | 6 +++--- .../wpf/advanced/custom-dependency-properties.md | 2 +- .../wpf/advanced/dependency-property-metadata.md | 2 +- .../dependency-property-value-precedence.md | 2 +- .../framework/wpf/advanced/documents-in-wpf.md | 2 +- .../wpf/advanced/drag-and-drop-overview.md | 2 +- .../framework/wpf/advanced/drag-and-drop.md | 2 +- .../wpf/advanced/draw-text-using-glyphs.md | 2 +- .../wpf/advanced/framework-property-metadata.md | 2 +- .../wpf/advanced/globalization-for-wpf.md | 4 ++-- .../how-to-create-a-custom-routed-event.md | 2 +- ...to-make-an-object-follow-the-mouse-pointer.md | 2 +- .../how-to-register-an-attached-property.md | 2 +- ...ow-to-set-margins-of-elements-and-controls.md | 2 +- .../how-to-use-a-grid-for-automatic-layout.md | 2 +- ...to-use-automatic-layout-to-create-a-button.md | 2 +- .../wpf/advanced/inline-styles-and-templates.md | 2 +- .../framework/wpf/advanced/input-overview.md | 2 +- ...-to-the-glyphrun-object-and-glyphs-element.md | 2 +- .../localization-attributes-and-comments.md | 2 +- .../wpf/advanced/merged-resource-dictionaries.md | 2 +- .../wpf/advanced/object-lifetime-events.md | 2 +- .../wpf/advanced/optimizing-performance-text.md | 2 +- .../optimizing-wpf-application-performance.md | 2 +- .../framework/wpf/advanced/performance.md | 2 +- .../presentationoptions-freeze-attribute.md | 2 +- .../wpf/advanced/propertypath-xaml-syntax.md | 2 +- .../framework/wpf/advanced/resources-and-code.md | 4 ++-- .../wpf/advanced/routed-events-overview.md | 2 +- .../framework/wpf/advanced/threading-model.md | 8 ++++---- .../framework/wpf/advanced/trees-in-wpf.md | 2 +- .../framework/wpf/advanced/typography-in-wpf.md | 4 ++-- .../framework/wpf/advanced/typography.md | 2 +- .../advanced/use-automatic-layout-overview.md | 2 +- ...g-a-windows-forms-composite-control-in-wpf.md | 2 +- ...g-a-wpf-composite-control-in-windows-forms.md | 4 ++-- .../walkthrough-hosting-wpf-content-in-win32.md | 8 ++++---- .../wpf/advanced/wpf-and-win32-interoperation.md | 6 +++--- ...pf-globalization-and-localization-overview.md | 16 ++++++++-------- .../framework/wpf/advanced/xaml-in-wpf.md | 2 +- .../xaml-loading-and-dependency-properties.md | 2 +- .../wpf/controls/control-authoring-overview.md | 2 +- .../framework/wpf/controls/index.md | 4 ++-- .../framework/wpf/controls/panels-overview.md | 4 ++-- .../framework/wpf/controls/textblock-overview.md | 2 +- .../framework/wpf/controls/textblock.md | 2 +- .../ui-automation-of-a-wpf-custom-control.md | 2 +- ...lkthroughs-create-a-custom-animated-button.md | 2 +- ...-to-set-up-notification-of-binding-updates.md | 2 +- .../graphics-multimedia/3-d-graphics-overview.md | 4 ++-- .../graphics-multimedia/animation-overview.md | 2 +- ...mate-a-property-without-using-a-storyboard.md | 2 +- .../graphics-multimedia/multimedia-overview.md | 2 +- ...ting-visual-objects-in-a-win32-application.md | 2 +- .../graphics-multimedia/wpf-brushes-overview.md | 2 +- 56 files changed, 80 insertions(+), 80 deletions(-) diff --git a/dotnet-desktop-guide/framework/wpf/advanced/bidirectional-features-in-wpf-overview.md b/dotnet-desktop-guide/framework/wpf/advanced/bidirectional-features-in-wpf-overview.md index 69234f8413..a5dce159f2 100644 --- a/dotnet-desktop-guide/framework/wpf/advanced/bidirectional-features-in-wpf-overview.md +++ b/dotnet-desktop-guide/framework/wpf/advanced/bidirectional-features-in-wpf-overview.md @@ -161,7 +161,7 @@ The following graphic shows the output of the previous example with arrows drawn ![Graphic that illustrates arrows drawn using the Path element.](./media/bidirectional-features-in-wpf-overview/arrows-drawn-path-element.png) -The and are two examples of a how UI elements in a specific direction within a container, can be used with elements such as which renders ink on a surface, , . Whenever you need a right to left behavior for your content that mimics a left to right behavior, or vice versa, Windows Presentation Foundation (WPF) provides that capability. +The and are two examples of a how WPF uses . Beside laying out UI elements in a specific direction within a container, can be used with elements such as which renders ink on a surface, , . Whenever you need a right to left behavior for your content that mimics a left to right behavior, or vice versa, Windows Presentation Foundation (WPF) provides that capability. diff --git a/dotnet-desktop-guide/framework/wpf/advanced/code-behind-and-xaml-in-wpf.md b/dotnet-desktop-guide/framework/wpf/advanced/code-behind-and-xaml-in-wpf.md index b3305b60bc..6436c246e2 100644 --- a/dotnet-desktop-guide/framework/wpf/advanced/code-behind-and-xaml-in-wpf.md +++ b/dotnet-desktop-guide/framework/wpf/advanced/code-behind-and-xaml-in-wpf.md @@ -47,13 +47,13 @@ ms.assetid: 9df6d3c9-aed3-471c-af36-6859b19d999f - The handler must match the delegate for the appropriate event in the backing type system. -- For the Microsoft Visual Basic language specifically, you can use the language-specific `Handles` keyword to associate handlers with instances and events in the handler declaration, instead of attaching handlers with attributes in WPF event system, such as certain routed event scenarios or attached events. For details, see [Visual Basic and WPF Event Handling](visual-basic-and-wpf-event-handling.md). +- For the Microsoft Visual Basic language specifically, you can use the language-specific `Handles` keyword to associate handlers with instances and events in the handler declaration, instead of attaching handlers with attributes in XAML. However, this technique does have some limitations because the `Handles` keyword cannot support all of the specific features of the WPF event system, such as certain routed event scenarios or attached events. For details, see [Visual Basic and WPF Event Handling](visual-basic-and-wpf-event-handling.md). ## x:Code - [x:Code](/dotnet/desktop/xaml-services/xcode-intrinsic-xaml-type) is a directive element defined in WPF schema) will not try to interpret the contents literally as XML. + [x:Code](/dotnet/desktop/xaml-services/xcode-intrinsic-xaml-type) is a directive element defined in XAML. An `x:Code` directive element can contain inline programming code. The code that is defined inline can interact with the XAML on the same page. The following example illustrates inline C# code. Notice that the code is inside the `x:Code` element and that the code must be surrounded by `` to escape the contents for XML, so that a XAML processor (interpreting either the XAML schema or the WPF schema) will not try to interpret the contents literally as XML. [!code-xaml[XAMLOvwSupport#ButtonWithInlineCode](~/samples/snippets/csharp/VS_Snippets_Wpf/XAMLOvwSupport/CSharp/page4.xaml#buttonwithinlinecode)] @@ -61,7 +61,7 @@ ms.assetid: 9df6d3c9-aed3-471c-af36-6859b19d999f ## Inline Code Limitations - You should consider avoiding or limiting the use of inline code. In terms of architecture and coding philosophy, maintaining a separation between markup and code-behind keeps the designer and developer roles much more distinct. On a more technical level, the code that you write for inline code can be awkward to write, because you are always writing into the WPF mappings include most but not all CLR namespaces that are present in the WPF assemblies; you will have to fully qualify calls to types and members contained within the other CLR namespaces. You also cannot define anything beyond the partial class in the inline code, and all user code entities you reference must exist as a member or variable within the generated partial class. Other language specific programming features, such as macros or `#ifdef` against global variables or build variables, are also not available. For more information, see [x:Code Intrinsic XAML Type](/dotnet/desktop/xaml-services/xcode-intrinsic-xaml-type). + You should consider avoiding or limiting the use of inline code. In terms of architecture and coding philosophy, maintaining a separation between markup and code-behind keeps the designer and developer roles much more distinct. On a more technical level, the code that you write for inline code can be awkward to write, because you are always writing into the XAML generated partial class, and can only use the default XML namespace mappings. Because you cannot add `using` statements, you must fully qualify many of the API calls that you make. The default WPF mappings include most but not all CLR namespaces that are present in the WPF assemblies; you will have to fully qualify calls to types and members contained within the other CLR namespaces. You also cannot define anything beyond the partial class in the inline code, and all user code entities you reference must exist as a member or variable within the generated partial class. Other language specific programming features, such as macros or `#ifdef` against global variables or build variables, are also not available. For more information, see [x:Code Intrinsic XAML Type](/dotnet/desktop/xaml-services/xcode-intrinsic-xaml-type). ## See also diff --git a/dotnet-desktop-guide/framework/wpf/advanced/custom-dependency-properties.md b/dotnet-desktop-guide/framework/wpf/advanced/custom-dependency-properties.md index f682c377fa..9cdf673a84 100644 --- a/dotnet-desktop-guide/framework/wpf/advanced/custom-dependency-properties.md +++ b/dotnet-desktop-guide/framework/wpf/advanced/custom-dependency-properties.md @@ -25,7 +25,7 @@ This topic describes the reasons that Windows Presentation Foundation (WPF) appl ## Prerequisites -This topic assumes that you understand dependency properties from the perspective of a consumer of existing dependency properties on WPF classes, and have read the [Dependency Properties Overview](dependency-properties-overview.md) topic. In order to follow the examples in this topic, you should also understand WPF applications. +This topic assumes that you understand dependency properties from the perspective of a consumer of existing dependency properties on WPF classes, and have read the [Dependency Properties Overview](dependency-properties-overview.md) topic. In order to follow the examples in this topic, you should also understand XAML and know how to write WPF applications. diff --git a/dotnet-desktop-guide/framework/wpf/advanced/dependency-property-metadata.md b/dotnet-desktop-guide/framework/wpf/advanced/dependency-property-metadata.md index 5561ffe54b..57f81ef6d1 100644 --- a/dotnet-desktop-guide/framework/wpf/advanced/dependency-property-metadata.md +++ b/dotnet-desktop-guide/framework/wpf/advanced/dependency-property-metadata.md @@ -17,7 +17,7 @@ The Windows Presentation Foundation (WPF) property system includes a metadata re ## Prerequisites - This topic assumes that you understand dependency properties from the perspective of a consumer of existing dependency properties on WPF applications. + This topic assumes that you understand dependency properties from the perspective of a consumer of existing dependency properties on WPF classes, and have read the [Dependency Properties Overview](dependency-properties-overview.md). In order to follow the examples in this topic, you should also understand XAML and know how to write WPF applications. diff --git a/dotnet-desktop-guide/framework/wpf/advanced/dependency-property-value-precedence.md b/dotnet-desktop-guide/framework/wpf/advanced/dependency-property-value-precedence.md index 86227eb3e9..6a05b706ac 100644 --- a/dotnet-desktop-guide/framework/wpf/advanced/dependency-property-value-precedence.md +++ b/dotnet-desktop-guide/framework/wpf/advanced/dependency-property-value-precedence.md @@ -17,7 +17,7 @@ ms.assetid: 1fbada8e-4867-4ed1-8d97-62c07dad7ebc ## Prerequisites - This topic assumes that you understand dependency properties from the perspective of a consumer of existing dependency properties on WPF classes, and have read [Dependency Properties Overview](dependency-properties-overview.md). To follow the examples in this topic, you should also understand WPF applications. + This topic assumes that you understand dependency properties from the perspective of a consumer of existing dependency properties on WPF classes, and have read [Dependency Properties Overview](dependency-properties-overview.md). To follow the examples in this topic, you should also understand XAML and know how to write WPF applications. diff --git a/dotnet-desktop-guide/framework/wpf/advanced/documents-in-wpf.md b/dotnet-desktop-guide/framework/wpf/advanced/documents-in-wpf.md index e455b7b265..b69c2fc184 100644 --- a/dotnet-desktop-guide/framework/wpf/advanced/documents-in-wpf.md +++ b/dotnet-desktop-guide/framework/wpf/advanced/documents-in-wpf.md @@ -16,7 +16,7 @@ ms.assetid: 6e8db7bc-050a-4070-aa72-bb8c46e87ff8 --- # Documents in WPF -WPF also provides integrated services for document display, packaging, and security. This topic provides an introduction to WPF document types and document packaging. +Windows Presentation Foundation (WPF) offers a wide range of document features that enable the creation of high-fidelity content that is designed to be more easily accessed and read than in previous generations of Windows. In addition to enhanced capabilities and quality, WPF also provides integrated services for document display, packaging, and security. This topic provides an introduction to WPF document types and document packaging. diff --git a/dotnet-desktop-guide/framework/wpf/advanced/drag-and-drop-overview.md b/dotnet-desktop-guide/framework/wpf/advanced/drag-and-drop-overview.md index f415dc6e63..42c5b3e201 100644 --- a/dotnet-desktop-guide/framework/wpf/advanced/drag-and-drop-overview.md +++ b/dotnet-desktop-guide/framework/wpf/advanced/drag-and-drop-overview.md @@ -17,7 +17,7 @@ ms.assetid: 1a5b27b0-0ac5-4cdf-86c0-86ac0271fa64 --- # Drag and Drop Overview -This topic provides an overview of drag-and-drop support in user interface (UI), and dropping them. +This topic provides an overview of drag-and-drop support in Windows Presentation Foundation (WPF) applications. Drag-and-drop commonly refers to a method of data transfer that involves using a mouse (or some other pointing device) to select one or more objects, dragging these objects over some desired drop target in the user interface (UI), and dropping them. diff --git a/dotnet-desktop-guide/framework/wpf/advanced/drag-and-drop.md b/dotnet-desktop-guide/framework/wpf/advanced/drag-and-drop.md index 8c4c6ad6aa..e61241fadd 100644 --- a/dotnet-desktop-guide/framework/wpf/advanced/drag-and-drop.md +++ b/dotnet-desktop-guide/framework/wpf/advanced/drag-and-drop.md @@ -12,7 +12,7 @@ ms.assetid: 77c48920-8c8b-41eb-8fe8-b411962c8623 --- # Drag and Drop -WPF applications as well as other Windows applications. +Windows Presentation Foundation (WPF) provides a highly flexible drag and drop infrastructure which supports dragging and dropping of data within both WPF applications as well as other Windows applications. ## In This Section diff --git a/dotnet-desktop-guide/framework/wpf/advanced/draw-text-using-glyphs.md b/dotnet-desktop-guide/framework/wpf/advanced/draw-text-using-glyphs.md index 11ecc4be2c..4cedf57882 100644 --- a/dotnet-desktop-guide/framework/wpf/advanced/draw-text-using-glyphs.md +++ b/dotnet-desktop-guide/framework/wpf/advanced/draw-text-using-glyphs.md @@ -14,7 +14,7 @@ This topic explains how to use the low-level object in XAML. The examples assume that the Arial, Courier New, and Times New Roman fonts are installed in the C:\WINDOWS\Fonts folder on the local computer. + The following examples show how to define properties for a object in XAML. The object represents the output of a in XAML. The examples assume that the Arial, Courier New, and Times New Roman fonts are installed in the C:\WINDOWS\Fonts folder on the local computer. [!code-xaml[GlyphsOvwSample1#1](~/samples/snippets/csharp/VS_Snippets_Wpf/GlyphsOvwSample1/CS/default.xaml#1)] diff --git a/dotnet-desktop-guide/framework/wpf/advanced/framework-property-metadata.md b/dotnet-desktop-guide/framework/wpf/advanced/framework-property-metadata.md index 1fd0cd9d30..7aabe269e9 100644 --- a/dotnet-desktop-guide/framework/wpf/advanced/framework-property-metadata.md +++ b/dotnet-desktop-guide/framework/wpf/advanced/framework-property-metadata.md @@ -9,7 +9,7 @@ ms.assetid: 9962f380-b885-4b61-a62e-457397083fea --- # Framework Property Metadata -Framework property metadata options are reported for the properties of object elements considered to be at the WPF framework level in the WPF presentation APIs and executables. Framework property metadata is queried by these systems to determine feature-specific characteristics of particular element properties. +Framework property metadata options are reported for the properties of object elements considered to be at the WPF framework level in the Windows Presentation Foundation (WPF) architecture. In general the WPF framework-level designation entails that features such as rendering, data binding, and property system refinements are handled by the WPF presentation APIs and executables. Framework property metadata is queried by these systems to determine feature-specific characteristics of particular element properties. diff --git a/dotnet-desktop-guide/framework/wpf/advanced/globalization-for-wpf.md b/dotnet-desktop-guide/framework/wpf/advanced/globalization-for-wpf.md index d12d9cb4de..3ad5645b76 100644 --- a/dotnet-desktop-guide/framework/wpf/advanced/globalization-for-wpf.md +++ b/dotnet-desktop-guide/framework/wpf/advanced/globalization-for-wpf.md @@ -63,7 +63,7 @@ The following example shows a hexadecimal character reference. Notice that it ha ### Unicode - WPF application can use to manipulate strings without understanding whether they have surrogate pairs or combining characters. + XAML supports all Unicode features including surrogates. As long as the character set can be mapped to Unicode, it is supported. For example, GB18030 introduces some characters that are mapped to the Chinese, Japanese, and Korean (CFK) extension A and B and surrogate pairs, therefore it is fully supported. A WPF application can use to manipulate strings without understanding whether they have surrogate pairs or combining characters. @@ -165,7 +165,7 @@ The following example shows a hexadecimal character reference. Notice that it ha ### Localizable User Interface - UI. UI and use a programming language such as C# to react to user interaction. + WPF applications use XAML to define their UI. XAML allows developers to specify a hierarchy of objects with a set of properties and logic. The primary use of XAML is to develop WPF applications but it can be used to specify a hierarchy of any common language runtime (CLR) objects. Most developers use XAML to specify their application's UI and use a programming language such as C# to react to user interaction. From a resource point of view, a UI is a resource element and therefore its final distribution format must be localizable to support international languages. Because XAML cannot handle events many XAML applications contain blocks of code to do this. For more information, see [XAML in WPF](xaml-in-wpf.md). Code is stripped out and compiled into different binaries when a XAML file is tokenized into the BAML form of XAML. The BAML form of XAML files, images, and other types of managed resource objects are embedded in the satellite resource assembly, which can be localized into other languages, or the main assembly when localization is not required. diff --git a/dotnet-desktop-guide/framework/wpf/advanced/how-to-create-a-custom-routed-event.md b/dotnet-desktop-guide/framework/wpf/advanced/how-to-create-a-custom-routed-event.md index afced90e19..90c39176fe 100644 --- a/dotnet-desktop-guide/framework/wpf/advanced/how-to-create-a-custom-routed-event.md +++ b/dotnet-desktop-guide/framework/wpf/advanced/how-to-create-a-custom-routed-event.md @@ -20,7 +20,7 @@ For your custom event to support event routing, you need to register a ; that subclass is built as a separate assembly and then instantiated as a custom class on a separate Windows Presentation Foundation (WPF) element does. + Note also that this example basically implements an entire subclass of ; that subclass is built as a separate assembly and then instantiated as a custom class on a separate XAML page. This is to illustrate the concept that subclassed controls can be inserted into trees composed of other controls, and that in this situation, custom events on these controls have the very same event routing capabilities as any native WPF element does. [!code-csharp[RoutedEventCustom#CustomClass](~/samples/snippets/csharp/VS_Snippets_Wpf/RoutedEventCustom/CSharp/SDKSampleLibrary/class1.cs#customclass)] [!code-vb[RoutedEventCustom#CustomClass](~/samples/snippets/visualbasic/VS_Snippets_Wpf/RoutedEventCustom/VB/SDKSampleLibrary/Class1.vb#customclass)] diff --git a/dotnet-desktop-guide/framework/wpf/advanced/how-to-make-an-object-follow-the-mouse-pointer.md b/dotnet-desktop-guide/framework/wpf/advanced/how-to-make-an-object-follow-the-mouse-pointer.md index 891affc0f7..ba69ad66f2 100644 --- a/dotnet-desktop-guide/framework/wpf/advanced/how-to-make-an-object-follow-the-mouse-pointer.md +++ b/dotnet-desktop-guide/framework/wpf/advanced/how-to-make-an-object-follow-the-mouse-pointer.md @@ -15,7 +15,7 @@ description: Learn how to make an object follow the mouse pointer and change the This example shows how to change the dimensions of an object when the mouse pointer moves on the screen. - The example includes an user interface (UI) and a code-behind file that creates the event handler. + The example includes an Extensible Application Markup Language (XAML) file that creates the user interface (UI) and a code-behind file that creates the event handler. ## Example diff --git a/dotnet-desktop-guide/framework/wpf/advanced/how-to-register-an-attached-property.md b/dotnet-desktop-guide/framework/wpf/advanced/how-to-register-an-attached-property.md index 17dee398c3..5fa815e623 100644 --- a/dotnet-desktop-guide/framework/wpf/advanced/how-to-register-an-attached-property.md +++ b/dotnet-desktop-guide/framework/wpf/advanced/how-to-register-an-attached-property.md @@ -12,7 +12,7 @@ description: Learn how to register an attached property and provide public acces --- # How to: Register an Attached Property -This example shows how to register an attached property and provide public accessors so that you can use the property in both WPF types are also implemented as dependency properties. You can use dependency properties on any types. +This example shows how to register an attached property and provide public accessors so that you can use the property in both XAML and code. Attached properties are a syntax concept defined by XAML. Most attached properties for WPF types are also implemented as dependency properties. You can use dependency properties on any types. ## Example diff --git a/dotnet-desktop-guide/framework/wpf/advanced/how-to-set-margins-of-elements-and-controls.md b/dotnet-desktop-guide/framework/wpf/advanced/how-to-set-margins-of-elements-and-controls.md index bed1b5bd84..b712750973 100644 --- a/dotnet-desktop-guide/framework/wpf/advanced/how-to-set-margins-of-elements-and-controls.md +++ b/dotnet-desktop-guide/framework/wpf/advanced/how-to-set-margins-of-elements-and-controls.md @@ -15,7 +15,7 @@ description: Learn how to set the Margin property by changing any existing prope This example describes how to set the property, by changing any existing property value for the margin in code-behind. The property is a property of the base element, and is thus inherited by a variety of controls and other elements. - This example is written in XAML refers to. The code-behind is shown in both a C# and a Microsoft Visual Basic version. + This example is written in Extensible Application Markup Language (XAML), with a code-behind file that the XAML refers to. The code-behind is shown in both a C# and a Microsoft Visual Basic version. ## Example diff --git a/dotnet-desktop-guide/framework/wpf/advanced/how-to-use-a-grid-for-automatic-layout.md b/dotnet-desktop-guide/framework/wpf/advanced/how-to-use-a-grid-for-automatic-layout.md index c13799ce0f..10dcd44978 100644 --- a/dotnet-desktop-guide/framework/wpf/advanced/how-to-use-a-grid-for-automatic-layout.md +++ b/dotnet-desktop-guide/framework/wpf/advanced/how-to-use-a-grid-for-automatic-layout.md @@ -11,7 +11,7 @@ ms.assetid: ab9de407-e0c1-4047-bdf0-24951bf73879 This example describes how to use a grid in the automatic layout approach to creating a localizable application. - Localization of a UI was adapted for required adjustment. Now with the capabilities of Windows Presentation Foundation (WPF) you can design elements that reduce the need for adjustment. The approach to writing applications that can be more easily re-sized and repositioned is called `auto layout`. + Localization of a user interface (UI) can be a time consuming process. Often localizers need to re-size and reposition elements in addition to translating text. In the past each language that a UI was adapted for required adjustment. Now with the capabilities of Windows Presentation Foundation (WPF) you can design elements that reduce the need for adjustment. The approach to writing applications that can be more easily re-sized and repositioned is called `auto layout`. The following Extensible Application Markup Language (XAML) example demonstrates using a grid to position some buttons and text. Notice that the height and width of the cells are set to `Auto`; therefore the cell that contains the button with an image adjusts to fit the image. Because the element can adjust to its content it can be useful when taking the automatic layout approach to designing applications that can be localized. diff --git a/dotnet-desktop-guide/framework/wpf/advanced/how-to-use-automatic-layout-to-create-a-button.md b/dotnet-desktop-guide/framework/wpf/advanced/how-to-use-automatic-layout-to-create-a-button.md index 08d3f494d5..6c1885329d 100644 --- a/dotnet-desktop-guide/framework/wpf/advanced/how-to-use-automatic-layout-to-create-a-button.md +++ b/dotnet-desktop-guide/framework/wpf/advanced/how-to-use-automatic-layout-to-create-a-button.md @@ -11,7 +11,7 @@ ms.assetid: 96c206d0-9e77-4784-9d2d-5045aed2021c This example describes how to use the automatic layout approach to create a button in a localizable application. - Localization of a UI was adapted for required adjustment. Now with the capabilities of Windows Presentation Foundation (WPF) you can design elements that reduce the need for adjustment. The approach to writing applications that can be more easily resized and repositioned is called `automatic layout`. + Localization of a user interface (UI) can be a time consuming process. Often localizers need to resize and reposition elements in addition to translating text. In the past each language that a UI was adapted for required adjustment. Now with the capabilities of Windows Presentation Foundation (WPF) you can design elements that reduce the need for adjustment. The approach to writing applications that can be more easily resized and repositioned is called `automatic layout`. ## Example diff --git a/dotnet-desktop-guide/framework/wpf/advanced/inline-styles-and-templates.md b/dotnet-desktop-guide/framework/wpf/advanced/inline-styles-and-templates.md index c019279341..8e94b5947d 100644 --- a/dotnet-desktop-guide/framework/wpf/advanced/inline-styles-and-templates.md +++ b/dotnet-desktop-guide/framework/wpf/advanced/inline-styles-and-templates.md @@ -11,7 +11,7 @@ ms.assetid: 69a1a3f9-acb5-4e2c-9c43-2e376c055ac4 --- # Inline Styles and Templates -XAML that take the types and almost always make resource references to existing styles and templates rather than define new ones inline. +Windows Presentation Foundation (WPF) provides objects and template objects ( subclasses) as a way to define the visual appearance of an element in resources, so that they can be used multiple times. For this reason, attributes in XAML that take the types and almost always make resource references to existing styles and templates rather than define new ones inline. ## Limitations of Inline Styles and Templates diff --git a/dotnet-desktop-guide/framework/wpf/advanced/input-overview.md b/dotnet-desktop-guide/framework/wpf/advanced/input-overview.md index 2da5c7eabc..025cdfc38d 100644 --- a/dotnet-desktop-guide/framework/wpf/advanced/input-overview.md +++ b/dotnet-desktop-guide/framework/wpf/advanced/input-overview.md @@ -29,7 +29,7 @@ ms.assetid: ee5258b7-6567-415a-9b1c-c0cbe46e79ef --- # Input Overview - The WPF and explains the architecture of the input systems. + The Windows Presentation Foundation (WPF) subsystem provides a powerful API for obtaining input from a variety of devices, including the mouse, keyboard, touch, and stylus. This topic describes the services provided by WPF and explains the architecture of the input systems. diff --git a/dotnet-desktop-guide/framework/wpf/advanced/introduction-to-the-glyphrun-object-and-glyphs-element.md b/dotnet-desktop-guide/framework/wpf/advanced/introduction-to-the-glyphrun-object-and-glyphs-element.md index abb9009356..8c62fb6efb 100644 --- a/dotnet-desktop-guide/framework/wpf/advanced/introduction-to-the-glyphrun-object-and-glyphs-element.md +++ b/dotnet-desktop-guide/framework/wpf/advanced/introduction-to-the-glyphrun-object-and-glyphs-element.md @@ -36,7 +36,7 @@ This topic describes the object and the [!NOTE] -> and are designed for fixed-format document presentation and print scenarios. UI scenarios, see the [Typography in WPF](typography-in-wpf.md). +> and are designed for fixed-format document presentation and print scenarios. WPF provides several elements for general layout and User interface (UI) scenarios such as and . For more information on layout and UI scenarios, see the [Typography in WPF](typography-in-wpf.md). diff --git a/dotnet-desktop-guide/framework/wpf/advanced/localization-attributes-and-comments.md b/dotnet-desktop-guide/framework/wpf/advanced/localization-attributes-and-comments.md index c9d758452b..ae7531822b 100644 --- a/dotnet-desktop-guide/framework/wpf/advanced/localization-attributes-and-comments.md +++ b/dotnet-desktop-guide/framework/wpf/advanced/localization-attributes-and-comments.md @@ -10,7 +10,7 @@ ms.assetid: ead2d9ac-b709-4ec1-a924-39927a29d02f --- # Localization Attributes and Comments -WPF Localization API to indicate which resources are to be localized. Free-form comments are any information that the application author wants to include. +Windows Presentation Foundation (WPF) localization comments are properties, inside XAML source code, supplied by developers to provide rules and hints for localization. WPF localization comments contain two sets of information: localizability attributes and free-form localization comments. Localizability attributes are used by the WPF Localization API to indicate which resources are to be localized. Free-form comments are any information that the application author wants to include. diff --git a/dotnet-desktop-guide/framework/wpf/advanced/merged-resource-dictionaries.md b/dotnet-desktop-guide/framework/wpf/advanced/merged-resource-dictionaries.md index 3377bd87c4..9ca3960a44 100644 --- a/dotnet-desktop-guide/framework/wpf/advanced/merged-resource-dictionaries.md +++ b/dotnet-desktop-guide/framework/wpf/advanced/merged-resource-dictionaries.md @@ -9,7 +9,7 @@ ms.assetid: d159531f-05d4-49fd-b951-c332de51e5bc --- # Merged Resource Dictionaries -WPF application outside of the compiled XAML application. Resources can then be shared across applications and are also more conveniently isolated for localization. +Windows Presentation Foundation (WPF) resources support a merged resource dictionary feature. This feature provides a way to define the resources portion of a WPF application outside of the compiled XAML application. Resources can then be shared across applications and are also more conveniently isolated for localization. ## Introducing a Merged Resource Dictionary diff --git a/dotnet-desktop-guide/framework/wpf/advanced/object-lifetime-events.md b/dotnet-desktop-guide/framework/wpf/advanced/object-lifetime-events.md index 354f25690b..9a56847ee9 100644 --- a/dotnet-desktop-guide/framework/wpf/advanced/object-lifetime-events.md +++ b/dotnet-desktop-guide/framework/wpf/advanced/object-lifetime-events.md @@ -34,7 +34,7 @@ This topic describes the specific WPF events that signify stages in an object li ## Prerequisites - This topic assumes that you understand dependency properties from the perspective of a consumer of existing dependency properties on WPF applications. + This topic assumes that you understand dependency properties from the perspective of a consumer of existing dependency properties on Windows Presentation Foundation (WPF) classes, and have read the [Dependency Properties Overview](dependency-properties-overview.md) topic. In order to follow the examples in this topic, you should also understand XAML (see [XAML in WPF](xaml-in-wpf.md)) and know how to write WPF applications. diff --git a/dotnet-desktop-guide/framework/wpf/advanced/optimizing-performance-text.md b/dotnet-desktop-guide/framework/wpf/advanced/optimizing-performance-text.md index 1beb819920..13bdd4c601 100644 --- a/dotnet-desktop-guide/framework/wpf/advanced/optimizing-performance-text.md +++ b/dotnet-desktop-guide/framework/wpf/advanced/optimizing-performance-text.md @@ -46,7 +46,7 @@ Windows Presentation Foundation (WPF) provides advanced text support including g - Fixed-format document representation, including clients for previous versions of Windows and other computing devices. > [!NOTE] -> and are designed for fixed-format document presentation and print scenarios. UI scenarios, see the [Typography in WPF](typography-in-wpf.md). +> and are designed for fixed-format document presentation and print scenarios. WPF provides several elements for general layout and user interface (UI) scenarios such as and . For more information on layout and UI scenarios, see the [Typography in WPF](typography-in-wpf.md). The following examples show how to define properties for a object in XAML. The examples assume that the Arial, Courier New, and Times New Roman fonts are installed in the **C:\WINDOWS\Fonts** folder on the local computer. diff --git a/dotnet-desktop-guide/framework/wpf/advanced/optimizing-wpf-application-performance.md b/dotnet-desktop-guide/framework/wpf/advanced/optimizing-wpf-application-performance.md index 36978734e9..4069004765 100644 --- a/dotnet-desktop-guide/framework/wpf/advanced/optimizing-wpf-application-performance.md +++ b/dotnet-desktop-guide/framework/wpf/advanced/optimizing-wpf-application-performance.md @@ -11,7 +11,7 @@ ms.assetid: ac8c6aa3-3c68-4a24-9827-3b6c829c1ebf --- # Optimizing WPF Application Performance -This section is intended as a reference for WPF, you should first familiarize yourself with both platforms. This section assumes working knowledge of both, and is written for programmers who already know enough to get their applications up and running. +This section is intended as a reference for Windows Presentation Foundation (WPF) application developers who are looking for ways to improve the performance of their applications. If you are a developer who is new to the Microsoft .NET Framework and WPF, you should first familiarize yourself with both platforms. This section assumes working knowledge of both, and is written for programmers who already know enough to get their applications up and running. > [!NOTE] > The performance data provided in this section are based on WPF applications running on a 2.8 GHz PC with 512 RAM and an ATI Radeon 9700 graphics card. diff --git a/dotnet-desktop-guide/framework/wpf/advanced/performance.md b/dotnet-desktop-guide/framework/wpf/advanced/performance.md index 68e1e31f1f..c543cfc46d 100644 --- a/dotnet-desktop-guide/framework/wpf/advanced/performance.md +++ b/dotnet-desktop-guide/framework/wpf/advanced/performance.md @@ -10,7 +10,7 @@ ms.assetid: c649a20f-8b7e-4a38-9b80-74839298d406 --- # Performance -Achieving optimal application performance requires forethought in application design and an understanding of best practices for WPF applications. +Achieving optimal application performance requires forethought in application design and an understanding of best practices for Windows Presentation Foundation (WPF) application development. The topics in this section provide additional information on building high performance WPF applications. ## In This Section diff --git a/dotnet-desktop-guide/framework/wpf/advanced/presentationoptions-freeze-attribute.md b/dotnet-desktop-guide/framework/wpf/advanced/presentationoptions-freeze-attribute.md index 30d08c9fa5..ce3fe16511 100644 --- a/dotnet-desktop-guide/framework/wpf/advanced/presentationoptions-freeze-attribute.md +++ b/dotnet-desktop-guide/framework/wpf/advanced/presentationoptions-freeze-attribute.md @@ -35,7 +35,7 @@ Sets the state to `true` on the cont The `Freeze` attribute is the only attribute or other programming element defined in the `http://schemas.microsoft.com/winfx/2006/xaml/presentation/options` XML namespace. The `Freeze` attribute exists in this special namespace specifically so that it can be designated as ignorable, using [mc:Ignorable Attribute](mc-ignorable-attribute.md) as part of the root element declarations. The reason that `Freeze` must be able to be ignorable is because not all XAML processor implementations are able to freeze a at load time; this capability is not part of the XAML specification. - The ability to process the `Freeze` attribute is specifically built in to the WPF XAML processor when processing the `Freeze` attribute on elements at load time. + The ability to process the `Freeze` attribute is specifically built in to the XAML processor that processes XAML for compiled applications. The attribute is not supported by any class, and the attribute syntax is not extensible or modifiable. If you are implementing your own XAML processor you can choose to parallel the freezing behavior of the WPF XAML processor when processing the `Freeze` attribute on elements at load time. Any value for the `Freeze` attribute other than `true` (not case sensitive) generates a load time error. (Specifying the `Freeze` attribute as `false` is not an error, but that is already the default, so setting to `false` does nothing). diff --git a/dotnet-desktop-guide/framework/wpf/advanced/propertypath-xaml-syntax.md b/dotnet-desktop-guide/framework/wpf/advanced/propertypath-xaml-syntax.md index 8a293a69b5..d97dd4c8b6 100644 --- a/dotnet-desktop-guide/framework/wpf/advanced/propertypath-xaml-syntax.md +++ b/dotnet-desktop-guide/framework/wpf/advanced/propertypath-xaml-syntax.md @@ -199,7 +199,7 @@ For instance, the property of ``` -The parentheses indicate that this property in a should be constructed using a partial qualification. It can use an XML namespace to find the type. The `ownerType` searches types that a WPF attached properties are implemented as dependency properties, so this issue is only of concern for custom attached properties.) +The parentheses indicate that this property in a should be constructed using a partial qualification. It can use an XML namespace to find the type. The `ownerType` searches types that a XAML processor has access to, through the declarations in each assembly. Most applications have the default XML namespace mapped to the `http://schemas.microsoft.com/winfx/2006/xaml/presentation` namespace, so a prefix is usually only necessary for custom types or types otherwise outside that namespace. `propertyName` must resolve to be the name of a property existing on the `ownerType`. The property specified as `propertyName` must be a . (All WPF attached properties are implemented as dependency properties, so this issue is only of concern for custom attached properties.) diff --git a/dotnet-desktop-guide/framework/wpf/advanced/resources-and-code.md b/dotnet-desktop-guide/framework/wpf/advanced/resources-and-code.md index ae3bc29a1e..66045e3c6f 100644 --- a/dotnet-desktop-guide/framework/wpf/advanced/resources-and-code.md +++ b/dotnet-desktop-guide/framework/wpf/advanced/resources-and-code.md @@ -15,7 +15,7 @@ ms.assetid: c1cfcddb-e39c-41c8-a7f3-60984914dfae --- # Resources and Code -This overview concentrates on how XAML syntax perspective, see [XAML Resources](/dotnet/desktop-wpf/fundamentals/xaml-resources-define). +This overview concentrates on how Windows Presentation Foundation (WPF) resources can be accessed or created using code rather than Extensible Application Markup Language (XAML) syntax. For more information on general resource usage and resources from a XAML syntax perspective, see [XAML Resources](/dotnet/desktop-wpf/fundamentals/xaml-resources-define). @@ -44,7 +44,7 @@ This overview concentrates on how XAML syntax perspective, see [XAML Resources]( ## Using Objects as Keys - Most resource usages will set the key of the resource to be a string. However, various WPF features deliberately do not use a string type to specify keys, instead this parameter is an object. The capability of having the resource be keyed by an object is used by the WPF style and theming support. The styles in themes which become the default style for an otherwise non-styled control are each keyed by the of the control that they should apply to. Being keyed by type provides a reliable lookup mechanism that works on default instances of each control type, and type can be detected by reflection and used for styling derived classes even though the derived type otherwise has no default style. You can specify a key for a resource defined in WPF features, such as [ComponentResourceKey Markup Extension](componentresourcekey-markup-extension.md). + Most resource usages will set the key of the resource to be a string. However, various WPF features deliberately do not use a string type to specify keys, instead this parameter is an object. The capability of having the resource be keyed by an object is used by the WPF style and theming support. The styles in themes which become the default style for an otherwise non-styled control are each keyed by the of the control that they should apply to. Being keyed by type provides a reliable lookup mechanism that works on default instances of each control type, and type can be detected by reflection and used for styling derived classes even though the derived type otherwise has no default style. You can specify a key for a resource defined in XAML by using the [x:Type Markup Extension](/dotnet/desktop/xaml-services/xtype-markup-extension). Similar extensions exist for other nonstring key usages that support WPF features, such as [ComponentResourceKey Markup Extension](componentresourcekey-markup-extension.md). ## See also diff --git a/dotnet-desktop-guide/framework/wpf/advanced/routed-events-overview.md b/dotnet-desktop-guide/framework/wpf/advanced/routed-events-overview.md index 3e026909e3..c6d626899e 100644 --- a/dotnet-desktop-guide/framework/wpf/advanced/routed-events-overview.md +++ b/dotnet-desktop-guide/framework/wpf/advanced/routed-events-overview.md @@ -26,7 +26,7 @@ This topic describes the concept of routed events in Windows Presentation Founda ## Prerequisites -This topic assumes that you have basic knowledge of the common language runtime (CLR) and object-oriented programming, as well as the concept of how the relationships between WPF elements can be conceptualized as a tree. In order to follow the examples in this topic, you should also understand WPF applications or pages. For more information, see [Walkthrough: My first WPF desktop application](../getting-started/walkthrough-my-first-wpf-desktop-application.md) and [XAML in WPF](xaml-in-wpf.md). +This topic assumes that you have basic knowledge of the common language runtime (CLR) and object-oriented programming, as well as the concept of how the relationships between WPF elements can be conceptualized as a tree. In order to follow the examples in this topic, you should also understand Extensible Application Markup Language (XAML) and know how to write very basic WPF applications or pages. For more information, see [Walkthrough: My first WPF desktop application](../getting-started/walkthrough-my-first-wpf-desktop-application.md) and [XAML in WPF](xaml-in-wpf.md). diff --git a/dotnet-desktop-guide/framework/wpf/advanced/threading-model.md b/dotnet-desktop-guide/framework/wpf/advanced/threading-model.md index 51a5af7cd6..d48138b2c0 100644 --- a/dotnet-desktop-guide/framework/wpf/advanced/threading-model.md +++ b/dotnet-desktop-guide/framework/wpf/advanced/threading-model.md @@ -23,7 +23,7 @@ ms.assetid: 02d8fd00-8d7c-4604-874c-58e40786770b --- # Threading Model -WPF developers won't have to write an interface that uses more than one thread. Because multithreaded programs are complex and difficult to debug, they should be avoided when single-threaded solutions exist. +Windows Presentation Foundation (WPF) is designed to save developers from the difficulties of threading. As a result, the majority of WPF developers won't have to write an interface that uses more than one thread. Because multithreaded programs are complex and difficult to debug, they should be avoided when single-threaded solutions exist. No matter how well architected, however, no UI framework will ever be able to provide a single-threaded solution for every sort of problem. WPF comes close, but there are still situations where multiple threads improve user interface (UI) responsiveness or application performance. After discussing some background material, this paper explores some of these situations and then concludes with a discussion of some lower-level details. @@ -34,13 +34,13 @@ WPF developers won't have to write an interface that uses more than one thread. ## Overview and the Dispatcher - Typically, UI. The rendering thread effectively runs hidden in the background while the UI thread receives input, handles events, paints the screen, and runs application code. Most applications use a single UI thread, although in some situations it is best to use several. We’ll discuss this with an example later. + Typically, WPF applications start with two threads: one for handling rendering and another for managing the UI. The rendering thread effectively runs hidden in the background while the UI thread receives input, handles events, paints the screen, and runs application code. Most applications use a single UI thread, although in some situations it is best to use several. We’ll discuss this with an example later. The UI thread queues work items inside an object called a . The selects work items on a priority basis and runs each one to completion. Every UI thread must have at least one , and each can execute work items in exactly one thread. The trick to building responsive, user-friendly applications is to maximize the throughput by keeping the work items small. This way items never get stale sitting in the queue waiting for processing. Any perceivable delay between input and response can frustrate a user. - How then are UI thread free to tend to items in the queue. When the big operation is complete, it can report its result back to the UI thread for display. + How then are WPF applications supposed to handle big operations? What if your code involves a large calculation or needs to query a database on some remote server? Usually, the answer is to handle the big operation in a separate thread, leaving the UI thread free to tend to items in the queue. When the big operation is complete, it can report its result back to the UI thread for display. Historically, Windows allows UI elements to be accessed only by the thread that created them. This means that a background thread in charge of some long-running task cannot update a text box when it is finished. Windows does this to ensure the integrity of UI components. A list box could look strange if its contents were updated by a background thread during painting. @@ -58,7 +58,7 @@ WPF developers won't have to write an interface that uses more than one thread. ### A Single-Threaded Application with a Long-Running Calculation - Most graphical user interfaces (GUIs) spend a large portion of their time idle while waiting for events that are generated in response to user interactions. With careful programming this idle time can be used constructively, without affecting the responsiveness of the UI. The UI thread. This means you must be sure to return to the periodically to process pending input events before they get stale. + Most graphical user interfaces (GUIs) spend a large portion of their time idle while waiting for events that are generated in response to user interactions. With careful programming this idle time can be used constructively, without affecting the responsiveness of the UI. The WPF threading model doesn’t allow input to interrupt an operation happening in the UI thread. This means you must be sure to return to the periodically to process pending input events before they get stale. Consider the following example: diff --git a/dotnet-desktop-guide/framework/wpf/advanced/trees-in-wpf.md b/dotnet-desktop-guide/framework/wpf/advanced/trees-in-wpf.md index 22b2614811..a7af8fe699 100644 --- a/dotnet-desktop-guide/framework/wpf/advanced/trees-in-wpf.md +++ b/dotnet-desktop-guide/framework/wpf/advanced/trees-in-wpf.md @@ -17,7 +17,7 @@ In many technologies, elements and components are organized in a tree structure ## Trees in WPF - The most complete tree structure in WPF is the object tree. If you define an application page in WPF subsystems and affect choices you make in markup or code. + The most complete tree structure in WPF is the object tree. If you define an application page in XAML and then load the XAML, the tree structure is created based on the nesting relationships of the elements in the markup. If you define an application or a portion of the application in code, then the tree structure is created based on how you assign property values for properties that implement the content model for a given object. In WPF, there are two ways that the complete object tree is conceptualized and can be reported to its public API: as the logical tree and as the visual tree. The distinctions between logical tree and visual tree are not always necessarily important, but they can occasionally cause issues with certain WPF subsystems and affect choices you make in markup or code. Even though you do not always manipulate either the logical tree or the visual tree directly, understanding the concepts of how the trees interact is useful for understanding WPF as a technology. Thinking of WPF as a tree metaphor of some kind is also crucial to understanding how property inheritance and event routing work in WPF. 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 93f32cafbd..9e0c6fe66a 100644 --- a/dotnet-desktop-guide/framework/wpf/advanced/typography-in-wpf.md +++ b/dotnet-desktop-guide/framework/wpf/advanced/typography-in-wpf.md @@ -88,7 +88,7 @@ Text with ClearType y-direction antialiasing ### Layout and User Interface - At the highest level of functionality, the text APIs provide common UI elements within an application, and offer an easy way to present and interact with text. Controls such as and enable more advanced or specialized text-handling. And classes such as , , and enable useful text manipulation. These UI controls provide properties such as , , and , which enable you to control the font that is used to render the text. + At the highest level of functionality, the text APIs provide common UI controls such as , , and . These controls provide the basic UI elements within an application, and offer an easy way to present and interact with text. Controls such as and enable more advanced or specialized text-handling. And classes such as , , and enable useful text manipulation. These UI controls provide properties such as , , and , which enable you to control the font that is used to render the text. #### Using Bitmap Effects, Transforms, and Text Effects @@ -122,7 +122,7 @@ Text with ClearType y-direction antialiasing #### Using Flow Documents - In addition to the common UI controls, UI controls. + In addition to the common UI controls, WPF offers a layout control for text presentation—the element. The element, in conjunction with the element, provides a control for large amounts of text with varying layout requirements. Layout controls provide access to advanced typography through the object and font-related properties of other UI controls. The following example shows text content hosted in a , which provides search, navigation, pagination, and content scaling support. diff --git a/dotnet-desktop-guide/framework/wpf/advanced/typography.md b/dotnet-desktop-guide/framework/wpf/advanced/typography.md index 83345cadc3..c963094d5d 100644 --- a/dotnet-desktop-guide/framework/wpf/advanced/typography.md +++ b/dotnet-desktop-guide/framework/wpf/advanced/typography.md @@ -13,7 +13,7 @@ ms.assetid: e4ef38db-b7d1-4bda-87ab-8bb738440ddc --- # Typography -WPF is rendered using Microsoft ClearType, which enhances the clarity and readability of text. WPF also supports OpenType fonts, which provide additional capabilities beyond those defined by the TrueType® format. +Windows Presentation Foundation (WPF) includes support for rich presentation of text content. Text in WPF is rendered using Microsoft ClearType, which enhances the clarity and readability of text. WPF also supports OpenType fonts, which provide additional capabilities beyond those defined by the TrueType® format. ## In This Section diff --git a/dotnet-desktop-guide/framework/wpf/advanced/use-automatic-layout-overview.md b/dotnet-desktop-guide/framework/wpf/advanced/use-automatic-layout-overview.md index 3f0c4f15a4..dadab423e0 100644 --- a/dotnet-desktop-guide/framework/wpf/advanced/use-automatic-layout-overview.md +++ b/dotnet-desktop-guide/framework/wpf/advanced/use-automatic-layout-overview.md @@ -9,7 +9,7 @@ description: Describes the guidelines for developers on how to write WPF applica --- # Use Automatic Layout Overview -This topic introduces guidelines for developers on how to write WPF application design. +This topic introduces guidelines for developers on how to write Windows Presentation Foundation (WPF) applications with localizable user interfaces (UIs). In the past, localization of a UI was a time consuming process. Each language that the UI was adapted for required a pixel by pixel adjustment. Today with the right design and right coding standards, UIs can be constructed so that localizers have less resizing and repositioning to do. The approach to writing applications that can be more easily resized and repositioned is called automatic layout, and can be achieved by using WPF application design. diff --git a/dotnet-desktop-guide/framework/wpf/advanced/walkthrough-hosting-a-windows-forms-composite-control-in-wpf.md b/dotnet-desktop-guide/framework/wpf/advanced/walkthrough-hosting-a-windows-forms-composite-control-in-wpf.md index 4e8fe75c95..d27f0579cb 100644 --- a/dotnet-desktop-guide/framework/wpf/advanced/walkthrough-hosting-a-windows-forms-composite-control-in-wpf.md +++ b/dotnet-desktop-guide/framework/wpf/advanced/walkthrough-hosting-a-windows-forms-composite-control-in-wpf.md @@ -13,7 +13,7 @@ description: Learn about an application that hosts a Windows Forms composite con --- # Walkthrough: Hosting a Windows Forms Composite Control in WPF -WPF application rather than to rewrite it from scratch. The most common scenario is when you have existing Windows Forms controls. In some cases, you might not even have access to the source code for these controls. WPF provides a straightforward procedure for hosting such controls in a WPF application. For example, you can use WPF for most of your programming while hosting your specialized controls. +Windows Presentation Foundation (WPF) provides a rich environment for creating applications. However, when you have a substantial investment in Windows Forms code, it can be more effective to reuse at least some of that code in your WPF application rather than to rewrite it from scratch. The most common scenario is when you have existing Windows Forms controls. In some cases, you might not even have access to the source code for these controls. WPF provides a straightforward procedure for hosting such controls in a WPF application. For example, you can use WPF for most of your programming while hosting your specialized controls. This walkthrough steps you through an application that hosts a Windows Forms composite control to perform data entry in a WPF application. The composite control is packaged in a DLL. This general procedure can be extended to more complex applications and controls. This walkthrough is designed to be nearly identical in appearance and functionality to [Walkthrough: Hosting a WPF Composite Control in Windows Forms](walkthrough-hosting-a-wpf-composite-control-in-windows-forms.md). The primary difference is that the hosting scenario is reversed. diff --git a/dotnet-desktop-guide/framework/wpf/advanced/walkthrough-hosting-a-wpf-composite-control-in-windows-forms.md b/dotnet-desktop-guide/framework/wpf/advanced/walkthrough-hosting-a-wpf-composite-control-in-windows-forms.md index 9a8a08cdb2..332fdaa25c 100644 --- a/dotnet-desktop-guide/framework/wpf/advanced/walkthrough-hosting-a-wpf-composite-control-in-windows-forms.md +++ b/dotnet-desktop-guide/framework/wpf/advanced/walkthrough-hosting-a-wpf-composite-control-in-windows-forms.md @@ -9,7 +9,7 @@ description: Learn about an application that hosts a WPF composite control to pe --- # Walkthrough: Hosting a WPF Composite Control in Windows Forms -WPF rather than to rewrite it from scratch. A common scenario is when you want to embed one or more controls implemented with WPF within your Windows Forms application. For more information about customizing WPF controls, see [Control Customization](../controls/control-customization.md). +Windows Presentation Foundation (WPF) provides a rich environment for creating applications. However, when you have a substantial investment in Windows Forms code, it can be more effective to extend your existing Windows Forms application with WPF rather than to rewrite it from scratch. A common scenario is when you want to embed one or more controls implemented with WPF within your Windows Forms application. For more information about customizing WPF controls, see [Control Customization](../controls/control-customization.md). This walkthrough steps you through an application that hosts a WPF composite control to perform data-entry in a Windows Forms application. The composite control is packaged in a DLL. This general procedure can be extended to more complex applications and controls. This walkthrough is designed to be nearly identical in appearance and functionality to [Walkthrough: Hosting a Windows Forms Composite Control in WPF](walkthrough-hosting-a-windows-forms-composite-control-in-wpf.md). The primary difference is that the hosting scenario is reversed. @@ -63,7 +63,7 @@ You need Visual Studio to complete this walkthrough. ### Creating the User Interface - The UI consists of five elements. Each element has an associated element that serves as a label. There are two elements at the bottom, **OK** and **Cancel**. When the user clicks either button, the control raises a custom event to return the information to the host. + The user interface (UI) for the composite control is implemented with Extensible Application Markup Language (XAML). The composite control UI consists of five elements. Each element has an associated element that serves as a label. There are two elements at the bottom, **OK** and **Cancel**. When the user clicks either button, the control raises a custom event to return the information to the host. #### Basic Layout diff --git a/dotnet-desktop-guide/framework/wpf/advanced/walkthrough-hosting-wpf-content-in-win32.md b/dotnet-desktop-guide/framework/wpf/advanced/walkthrough-hosting-wpf-content-in-win32.md index f71ef7a003..5834c583e0 100644 --- a/dotnet-desktop-guide/framework/wpf/advanced/walkthrough-hosting-wpf-content-in-win32.md +++ b/dotnet-desktop-guide/framework/wpf/advanced/walkthrough-hosting-wpf-content-in-win32.md @@ -11,7 +11,7 @@ description: Learn how Windows Presentation Foundation provides a straightforwar --- # Walkthrough: Hosting WPF Content in Win32 -WPF functionality to your application rather than rewriting your original code. WPF provides a straightforward mechanism for hosting WPF content in a Win32 window. +Windows Presentation Foundation (WPF) provides a rich environment for creating applications. However, when you have a substantial investment in Win32 code, it might be more effective to add WPF functionality to your application rather than rewriting your original code. WPF provides a straightforward mechanism for hosting WPF content in a Win32 window. This tutorial describes how to write a sample application, [Hosting WPF Content in a Win32 Window Sample](https://github.com/Microsoft/WPF-Samples/tree/master/Migration%20and%20Interoperability/Win32HostingWPFPage), that hosts WPF content in a Win32 window. You can extend this sample to host any Win32 window. Because it involves mixing managed and unmanaged code, the application is written in C++/CLI. @@ -32,7 +32,7 @@ WPF functionality to your application rather than rewriting your original code. This section outlines the basic procedure you use to host WPF content in a Win32 window. The remaining sections explain the details of each step. - The key to hosting WPF content on a Win32 window is the class. This class wraps the WPF content in a Win32 window, allowing it to be incorporated into your WPF in a single application. + The key to hosting WPF content on a Win32 window is the class. This class wraps the WPF content in a Win32 window, allowing it to be incorporated into your user interface (UI) as a child window. The following approach combines the Win32 and WPF in a single application. 1. Implement your WPF content as a managed class. @@ -135,7 +135,7 @@ WPF functionality to your application rather than rewriting your original code. You cannot host the WPF content directly in your application window. Instead, you first create an object to wrap the WPF content. This object is basically a window that is designed to host a WPF content. You host the object in the parent window by creating it as a child of a Win32 window that is part of your application. The constructor parameters contain much the same information that you would pass to CreateWindow when you create a Win32 child window. - You next create an instance of the WPF content object. In this case, the WPF content is implemented as a separate class, `WPFPage`, using C++/CLI. You could also implement the WPF content with WPF content as a DLL. You can add a reference to that DLL to your project, and use that reference to create an instance of the WPF content. + You next create an instance of the WPF content object. In this case, the WPF content is implemented as a separate class, `WPFPage`, using C++/CLI. You could also implement the WPF content with XAML. However, to do so you need to set up a separate project and build the WPF content as a DLL. You can add a reference to that DLL to your project, and use that reference to create an instance of the WPF content. You display the WPF content in your child window by assigning a reference to the WPF content to the property of the . @@ -159,7 +159,7 @@ WPF functionality to your application rather than rewriting your original code. ### Communicating with the WPF Content - There are two types of communication with the UI that allows the user to change various WPF content properties, such as the background color or default font size. + There are two types of communication with the WPF content. The application receives information from the WPF content when the user clicks the **OK** or **Cancel** buttons. The application also has a UI that allows the user to change various WPF content properties, such as the background color or default font size. As mentioned above, when the user clicks either button the WPF content raises an `OnButtonClicked` event. The application attaches a handler to this event to receive these notifications. If the **OK** button was clicked, the handler gets the user information from the WPF content and displays it in a set of static controls. diff --git a/dotnet-desktop-guide/framework/wpf/advanced/wpf-and-win32-interoperation.md b/dotnet-desktop-guide/framework/wpf/advanced/wpf-and-win32-interoperation.md index dab842eb13..025829b4a2 100644 --- a/dotnet-desktop-guide/framework/wpf/advanced/wpf-and-win32-interoperation.md +++ b/dotnet-desktop-guide/framework/wpf/advanced/wpf-and-win32-interoperation.md @@ -12,7 +12,7 @@ description: Learn how to interoperate Windows Presentation Foundation's environ --- # WPF and Win32 Interoperation -This topic provides an overview of how to interoperate WPF and Win32 code. Windows Presentation Foundation (WPF) provides a rich environment for creating applications. However, when you have a substantial investment in Win32 code, it might be more effective to reuse some of that code. +This topic provides an overview of how to interoperate Windows Presentation Foundation (WPF) and Win32 code. WPF provides a rich environment for creating applications. However, when you have a substantial investment in Win32 code, it might be more effective to reuse some of that code. @@ -40,7 +40,7 @@ One project-level complication is that you cannot compile Extensible Application - Use to load any XAML at run time, instead of compiling your XAML. -- Do not use WPF in code, building up the element tree from . +- Do not use XAML at all, and write all your WPF in code, building up the element tree from . Use whatever approach works best for you. @@ -61,7 +61,7 @@ A related concept to HWND is transparency within and between each HWND. This is ## Hosting WPF Content in a Microsoft Win32 Window -The key to hosting a WPF on a Win32 window is the class. This class wraps the WPF content in a Win32 window, so that the WPF content can be incorporated into your WPF in a single application. +The key to hosting a WPF on a Win32 window is the class. This class wraps the WPF content in a Win32 window, so that the WPF content can be incorporated into your UI as a child window. The following approach combines the Win32 and WPF in a single application. 1. Implement your WPF content (the content root element) as a managed class. Typically, the class inherits from one of the classes that can contain multiple child elements and/or used as a root element, such as or . In subsequent steps, this class is referred to as the WPF content class, and instances of the class are referred to as WPF content objects. diff --git a/dotnet-desktop-guide/framework/wpf/advanced/wpf-globalization-and-localization-overview.md b/dotnet-desktop-guide/framework/wpf/advanced/wpf-globalization-and-localization-overview.md index 8cb0bb9847..745225a5b4 100644 --- a/dotnet-desktop-guide/framework/wpf/advanced/wpf-globalization-and-localization-overview.md +++ b/dotnet-desktop-guide/framework/wpf/advanced/wpf-globalization-and-localization-overview.md @@ -12,7 +12,7 @@ ms.assetid: 56e5a5c8-6c96-4d19-b8e1-a5be1dc564af When you limit your product's availability to only one language, you limit your potential customer base to a fraction of our world's 7.5 billion population. If you want your applications to reach a global audience, cost-effective localization of your product is one of the best and most economical ways to reach more customers. -This overview introduces globalization and localization in WPF provides globalized design features, including automatic layout, satellite assemblies, and localized attributes and commenting. +This overview introduces globalization and localization in Windows Presentation Foundation (WPF). Globalization is the design and development of applications that perform in multiple locations. For example, globalization supports localized user interfaces and regional data for users in different cultures. WPF provides globalized design features, including automatic layout, satellite assemblies, and localized attributes and commenting. Localization is the translation of application resources into localized versions for the specific cultures that the application supports. When you localize in WPF, you use the APIs in the namespace. These APIs power the [LocBaml Tool Sample](https://github.com/microsoft/WPF-Samples/tree/master/Tools/LocBaml) command-line tool. For information about how to build and use LocBaml, see [Localize an Application](how-to-localize-an-application.md). @@ -22,9 +22,9 @@ You can make the most of the globalization and localization functionality that i ### Best Practices for WPF UI Design -When you design a UI, consider implementing these best practices: +When you design a WPF–based UI, consider implementing these best practices: -- Write your UI in UI in code. When you create your UI by using XAML, you expose it through built-in localization APIs. +- Write your UI in XAML; avoid creating UI in code. When you create your UI by using XAML, you expose it through built-in localization APIs. - Avoid using absolute positions and fixed sizes to lay out content; instead, use relative or automatic sizing. @@ -54,7 +54,7 @@ When you localize WPF–based applications, consider implementing these best pra - Use localization attributes to control localization instead of selectively omitting properties on elements. See [Localization Attributes and Comments](localization-attributes-and-comments.md) for more information. -- Use `msbuild -t:updateuid` and `-t:checkuid` to add and check properties in your UI, the task is typically tedious and less accurate. +- Use `msbuild -t:updateuid` and `-t:checkuid` to add and check properties in your XAML. Use properties to track changes between development and localization. properties help you localize new development changes. If you manually add properties to a UI, the task is typically tedious and less accurate. - Do not edit or change properties after you begin localization. @@ -66,7 +66,7 @@ When you localize WPF–based applications, consider implementing these best pra ## Localize a WPF Application -When you localize a WPF application, you have several options. For example, you can bind the localizable resources in your application to an XML file, store localizable text in resx tables, or have your localizer use Extensible Application Markup Language (XAML) files. This section describes a localization workflow that uses the BAML form of XAML, which provides several benefits: +When you localize a WPF application, you have several options. For example, you can bind the localizable resources in your application to an XML file, store localizable text in resx tables, or have your localizer use XAML files. This section describes a localization workflow that uses the BAML form of XAML, which provides several benefits: - You can localize after you build. @@ -86,7 +86,7 @@ When you develop a WPF application, the build process for localization is as fol The localization process begins after the unlocalized `MyDialog.resources.dll` file is built. The UI elements and properties in your original XAML are extracted from the BAML form of XAML into key-value pairs by using the APIs under . Localizers use the key-value pairs to localize the application. You can generate a new .resource.dll from the new values after localization is complete. -The keys of the key-value pairs are `x:Uid` values that are placed by the developer in the original UI after the localizer begins localizing, you can merge the development change with the already completed localization work so that minimal translation work is lost. +The keys of the key-value pairs are `x:Uid` values that are placed by the developer in the original XAML. These `x:Uid` values enable the API to track and merge changes that happen between the developer and the localizer during localization. For example, if the developer changes the UI after the localizer begins localizing, you can merge the development change with the already completed localization work so that minimal translation work is lost. The following graphic shows a typical localization workflow that is based on the BAML form of XAML. This diagram assumes the developer writes the application in English. The developer creates and globalizes the WPF application. In the project file the developer sets `en-US` so that on build, a language neutral main assembly gets generated with a satellite .resources.dll containing all localizable resources. Alternately, one could keep the source language in the main assembly because WPF localization APIs support extraction from the main assembly. After the build process, the XAML get compiled into BAML. The culturally neutral MyDialog.exe.resources.dll get shipped to the English speaking customer. @@ -128,9 +128,9 @@ The previous Window property automatically resizes the window according to the s properties are needed in order for WPF localization APIs to work correctly. -They are used by UI with an older localization of the UI. You add a property by running `msbuild -t:updateuid RunDialog.csproj` in a command shell. This is the recommended method of adding properties because manually adding them is typically time-consuming and less accurate. You can check that properties are correctly set by running `msbuild -t:checkuid RunDialog.csproj`. +They are used by WPF localization APIs to track changes between the development and localization of the user interface (UI). properties enable you to merge a newer version of the UI with an older localization of the UI. You add a property by running `msbuild -t:updateuid RunDialog.csproj` in a command shell. This is the recommended method of adding properties because manually adding them is typically time-consuming and less accurate. You can check that properties are correctly set by running `msbuild -t:checkuid RunDialog.csproj`. -The UI is structured by using the control, which is a useful control for taking advantage of the automatic layout in UI elements that are positioned in each cell can adapt to increases and decreases in size during localization. +The UI is structured by using the control, which is a useful control for taking advantage of the automatic layout in WPF. Note that the dialog box is split into three rows and five columns. Not one of the row and column definitions has a fixed size; hence, the UI elements that are positioned in each cell can adapt to increases and decreases in size during localization. [!code-xaml[GlobalizationRunDialog#GridColumnDef](~/samples/snippets/csharp/VS_Snippets_Wpf/GlobalizationRunDialog/CS/Window1.xaml#gridcolumndef)] diff --git a/dotnet-desktop-guide/framework/wpf/advanced/xaml-in-wpf.md b/dotnet-desktop-guide/framework/wpf/advanced/xaml-in-wpf.md index 723ce2fcd3..2ae24e0a6d 100644 --- a/dotnet-desktop-guide/framework/wpf/advanced/xaml-in-wpf.md +++ b/dotnet-desktop-guide/framework/wpf/advanced/xaml-in-wpf.md @@ -11,7 +11,7 @@ description: Learn how WPF types are implemented so that they can provide the re --- # XAML in WPF -WPF types are implemented such that they can provide the required type backing for a XAML representation. In general, you can create the majority of your WPF application UI in XAML markup. +Extensible Application Markup Language (XAML) is a markup language for declarative application programming. Windows Presentation Foundation (WPF) implements a XAML processor implementation and provides XAML language support. The WPF types are implemented such that they can provide the required type backing for a XAML representation. In general, you can create the majority of your WPF application UI in XAML markup. ## In This Section diff --git a/dotnet-desktop-guide/framework/wpf/advanced/xaml-loading-and-dependency-properties.md b/dotnet-desktop-guide/framework/wpf/advanced/xaml-loading-and-dependency-properties.md index fac9c62937..f7c83985b0 100644 --- a/dotnet-desktop-guide/framework/wpf/advanced/xaml-loading-and-dependency-properties.md +++ b/dotnet-desktop-guide/framework/wpf/advanced/xaml-loading-and-dependency-properties.md @@ -13,7 +13,7 @@ description: Learn about XAML loading and dependency properties and the current --- # XAML Loading and Dependency Properties -The current WPF implementation of its WPF XAML processor uses property system methods for dependency properties when loading binary XAML and processing attributes that are dependency properties. This effectively bypasses the property wrappers. When you implement custom dependency properties, you must account for this behavior and should avoid placing any other code in your property wrapper other than the property system methods and . +The current WPF implementation of its XAML processor is inherently dependency property aware. The WPF XAML processor uses property system methods for dependency properties when loading binary XAML and processing attributes that are dependency properties. This effectively bypasses the property wrappers. When you implement custom dependency properties, you must account for this behavior and should avoid placing any other code in your property wrapper other than the property system methods and . diff --git a/dotnet-desktop-guide/framework/wpf/controls/control-authoring-overview.md b/dotnet-desktop-guide/framework/wpf/controls/control-authoring-overview.md index 382ce34cf5..cee99cd2e6 100644 --- a/dotnet-desktop-guide/framework/wpf/controls/control-authoring-overview.md +++ b/dotnet-desktop-guide/framework/wpf/controls/control-authoring-overview.md @@ -46,7 +46,7 @@ The rich content model, styles, templates, and triggers minimize the need for yo ### Deriving from UserControl -The simplest way to create a control in WPF is to derive from . When you build a control that inherits from , you add existing components to the , name the components, and reference event handlers in WPF. +The simplest way to create a control in WPF is to derive from . When you build a control that inherits from , you add existing components to the , name the components, and reference event handlers in XAML. You can then reference the named elements and define the event handlers in code. This development model is very similar to the model used for application development in WPF. If built correctly, a can take advantage of the benefits of rich content, styles, and triggers. However, if your control inherits from , people who use your control will not be able to use a or to customize its appearance. It is necessary to derive from the class or one of its derived classes (other than ) to create a custom control that supports templates. diff --git a/dotnet-desktop-guide/framework/wpf/controls/index.md b/dotnet-desktop-guide/framework/wpf/controls/index.md index 2bf9d6cc1a..cb27418923 100644 --- a/dotnet-desktop-guide/framework/wpf/controls/index.md +++ b/dotnet-desktop-guide/framework/wpf/controls/index.md @@ -12,13 +12,13 @@ ms.assetid: 3f255a8a-35a8-4712-9065-472ff7d75599 # Controls -WPF SDK continues to use the term "control" to loosely mean any class that represents a visible object in an application, it is important to note that a class does not need to inherit from the class to have a visible presence. Classes that inherit from the class contain a , which allows the consumer of a control to radically change the control's appearance without having to create a new subclass. This topic discusses how controls (both those that do inherit from the class and those that do not) are commonly used in WPF. +Windows Presentation Foundation (WPF) ships with many of the common UI components that are used in almost every Windows application, such as , , , , and . Historically, these objects have been referred to as controls. While the WPF SDK continues to use the term "control" to loosely mean any class that represents a visible object in an application, it is important to note that a class does not need to inherit from the class to have a visible presence. Classes that inherit from the class contain a , which allows the consumer of a control to radically change the control's appearance without having to create a new subclass. This topic discusses how controls (both those that do inherit from the class and those that do not) are commonly used in WPF. ## Creating an Instance of a Control - You can add a control to an application by using either XAML. All controls can be created similarly. + You can add a control to an application by using either Extensible Application Markup Language (XAML) or code. The following example shows how to create a simple application that asks a user for their first and last name. This example creates six controls: two labels, two text boxes, and two buttons, in XAML. All controls can be created similarly. [!code-xaml[ControlsOverview#1](~/samples/snippets/csharp/VS_Snippets_Wpf/ControlsOverview/CSharp/Window1.xaml#1)] diff --git a/dotnet-desktop-guide/framework/wpf/controls/panels-overview.md b/dotnet-desktop-guide/framework/wpf/controls/panels-overview.md index f9a69c76ee..e4523ff18f 100644 --- a/dotnet-desktop-guide/framework/wpf/controls/panels-overview.md +++ b/dotnet-desktop-guide/framework/wpf/controls/panels-overview.md @@ -82,7 +82,7 @@ ms.assetid: f73644af-9941-4611-8754-6d4cef03fc44 ## User Interface Panels - There are six panel classes available in UI scenarios: , , , , , and . These panel elements are easy to use, versatile, and extensible enough for most applications. + There are six panel classes available in WPF that are optimized to support UI scenarios: , , , , , and . These panel elements are easy to use, versatile, and extensible enough for most applications. Each derived element treats sizing constraints differently. Understanding how a handles constraints in either the horizontal or vertical direction can make layout more predictable. @@ -275,7 +275,7 @@ ms.assetid: f73644af-9941-4611-8754-6d4cef03fc44 ## Localization/Globalization Support - UI. + WPF supports a number of features that assist in the creation of localizable UI. All panel elements natively support the property, which can be used to dynamically re-flow content based on a user's locale or language settings. For more information, see . diff --git a/dotnet-desktop-guide/framework/wpf/controls/textblock-overview.md b/dotnet-desktop-guide/framework/wpf/controls/textblock-overview.md index 40d5fd76c4..471551940c 100644 --- a/dotnet-desktop-guide/framework/wpf/controls/textblock-overview.md +++ b/dotnet-desktop-guide/framework/wpf/controls/textblock-overview.md @@ -12,7 +12,7 @@ ms.assetid: 24720bca-341a-4b03-8a6b-7a678023b10a --- # TextBlock Overview -The control provides flexible text support for UI scenarios that do not require more than one paragraph of text. It supports a number of properties that enable precise control of presentation, such as , , , , and . Text content can be added using the property. When used in XAML, content between the open and closing tag is implicitly added as the text of the element. +The control provides flexible text support for WPF applications. The element is targeted primarily toward basic UI scenarios that do not require more than one paragraph of text. It supports a number of properties that enable precise control of presentation, such as , , , , and . Text content can be added using the property. When used in XAML, content between the open and closing tag is implicitly added as the text of the element. A element can be instantiated very simply using XAML. diff --git a/dotnet-desktop-guide/framework/wpf/controls/textblock.md b/dotnet-desktop-guide/framework/wpf/controls/textblock.md index 29b4ea7611..f1e673e1b7 100644 --- a/dotnet-desktop-guide/framework/wpf/controls/textblock.md +++ b/dotnet-desktop-guide/framework/wpf/controls/textblock.md @@ -11,7 +11,7 @@ ms.assetid: ea5f7826-7a92-4de9-9eee-10ef700ce7b6 --- # TextBlock -The control provides flexible text support for UI scenarios that do not require more than one paragraph of text. +The control provides flexible text support for WPF applications. The element is targeted primarily toward basic UI scenarios that do not require more than one paragraph of text. ## In This Section diff --git a/dotnet-desktop-guide/framework/wpf/controls/ui-automation-of-a-wpf-custom-control.md b/dotnet-desktop-guide/framework/wpf/controls/ui-automation-of-a-wpf-custom-control.md index 508e2e648e..d2df3ab74b 100644 --- a/dotnet-desktop-guide/framework/wpf/controls/ui-automation-of-a-wpf-custom-control.md +++ b/dotnet-desktop-guide/framework/wpf/controls/ui-automation-of-a-wpf-custom-control.md @@ -15,7 +15,7 @@ ms.assetid: 47b310fc-fbd5-4ce2-a606-22d04c6d4911 --- # UI Automation of a WPF Custom Control -UI Automation enables both quality-assurance (test) code and accessibility applications such as screen readers to examine user-interface elements and simulate user interaction with them from other code. For information about UI Automation across all platforms, see Accessibility. +UI Automation provides a single, generalized interface that automation clients can use to examine or operate the user interfaces of a variety of platforms and frameworks. UI Automation enables both quality-assurance (test) code and accessibility applications such as screen readers to examine user-interface elements and simulate user interaction with them from other code. For information about UI Automation across all platforms, see Accessibility. This topic describes how to implement a server-side UI Automation provider for a custom control that runs in a WPF application. WPF supports UI Automation through a tree of peer automation objects that parallels the tree of user interface elements. Test code and applications that provide accessibility features can use automation peer objects directly (for in-process code) or through the generalized interface provided by UI Automation. diff --git a/dotnet-desktop-guide/framework/wpf/controls/walkthroughs-create-a-custom-animated-button.md b/dotnet-desktop-guide/framework/wpf/controls/walkthroughs-create-a-custom-animated-button.md index a40bcc500f..ce574da48d 100644 --- a/dotnet-desktop-guide/framework/wpf/controls/walkthroughs-create-a-custom-animated-button.md +++ b/dotnet-desktop-guide/framework/wpf/controls/walkthroughs-create-a-custom-animated-button.md @@ -14,7 +14,7 @@ As its name suggests, Windows Presentation Foundation (WPF) is great for making ![The customized button that you will create](./media/custom-button-blend-intro.jpg "custom_button_blend_Intro") - The vector graphics that make up the appearance of the button are created by using XAML is similar to HTML except it is more powerful and extensible. Extensible Application Markup Language (XAML) can be typed in manually using Visual Studio or Notepad, or you can use a visual design tool such as Blend for Visual Studio. Blend works by creating underlying XAML code, so both methods create the same graphics. + The vector graphics that make up the appearance of the button are created by using XAML. XAML is similar to HTML except it is more powerful and extensible. Extensible Application Markup Language (XAML) can be typed in manually using Visual Studio or Notepad, or you can use a visual design tool such as Blend for Visual Studio. Blend works by creating underlying XAML code, so both methods create the same graphics. ## In This Section diff --git a/dotnet-desktop-guide/framework/wpf/data/how-to-set-up-notification-of-binding-updates.md b/dotnet-desktop-guide/framework/wpf/data/how-to-set-up-notification-of-binding-updates.md index 5e67a99bb6..a2f18a7ce4 100644 --- a/dotnet-desktop-guide/framework/wpf/data/how-to-set-up-notification-of-binding-updates.md +++ b/dotnet-desktop-guide/framework/wpf/data/how-to-set-up-notification-of-binding-updates.md @@ -14,7 +14,7 @@ This example shows how to set up to be notified when the binding target (target) ## Example - user interface (UI) that it should update, because the bound data has changed. Note that for these events to work, and also for one-way or two-way binding to work properly, you need to implement your data class using the interface. For more information, see [Implement Property Change Notification](how-to-implement-property-change-notification.md). + Windows Presentation Foundation (WPF) raises a data update event each time that the binding source or target has been updated. Internally, this event is used to inform the user interface (UI) that it should update, because the bound data has changed. Note that for these events to work, and also for one-way or two-way binding to work properly, you need to implement your data class using the interface. For more information, see [Implement Property Change Notification](how-to-implement-property-change-notification.md). Set the or property (or both) to `true` in the binding. The handler you provide to listen for this event must be attached directly to the element where you want to be informed of changes, or to the overall data context if you want to be aware that anything in the context has changed. diff --git a/dotnet-desktop-guide/framework/wpf/graphics-multimedia/3-d-graphics-overview.md b/dotnet-desktop-guide/framework/wpf/graphics-multimedia/3-d-graphics-overview.md index f2258dba5a..da56549138 100644 --- a/dotnet-desktop-guide/framework/wpf/graphics-multimedia/3-d-graphics-overview.md +++ b/dotnet-desktop-guide/framework/wpf/graphics-multimedia/3-d-graphics-overview.md @@ -13,7 +13,7 @@ ms.assetid: 67f31ed4-e36b-4b02-9889-dcce245d7afc --- # 3D Graphics Overview - The 3D functionality in WPF is not designed to provide a full-featured game-development platform. This topic provides an overview of 3D functionality in the WPF graphics system. + The 3D functionality in Windows Presentation Foundation (WPF) enables developers to draw, transform, and animate 3D graphics in both markup and procedural code. Developers can combine 2D and 3D graphics to create rich controls, provide complex illustrations of data, or enhance the user experience of an application's interface. 3D support in WPF is not designed to provide a full-featured game-development platform. This topic provides an overview of 3D functionality in the WPF graphics system. @@ -65,7 +65,7 @@ Perspective and Orthographic Projections To build a model, begin by building a primitive, or mesh. A 3D primitive is a collection of vertices that form a single 3D entity. Most 3D systems provide primitives modeled on the simplest closed figure: a triangle defined by three vertices. Because the three points of a triangle are coplanar, you can continue adding triangles in order to model more complex shapes, called meshes. - The WPF 3D system currently provides the class, which allows you to specify any geometry; it does not currently support predefined 3D primitives like spheres and cubic forms. Begin creating a by specifying a list of triangle vertices as its property. Each vertex is specified as a . (In WPF needs information about which vertices are shared by which triangles. You provide this information by specifying a list of triangle indices with the property. This list specifies the order in which the points specified in the list will determine a triangle. + The WPF 3D system currently provides the class, which allows you to specify any geometry; it does not currently support predefined 3D primitives like spheres and cubic forms. Begin creating a by specifying a list of triangle vertices as its property. Each vertex is specified as a . (In XAML, specify this property as a list of numbers grouped in threes that represent the coordinates of each vertex.) Depending on its geometry, your mesh might be composed of many triangles, some of which share the same corners (vertices). To draw the mesh correctly, the WPF needs information about which vertices are shared by which triangles. You provide this information by specifying a list of triangle indices with the property. This list specifies the order in which the points specified in the list will determine a triangle. [!code-xaml[basic3d#Basic3DXAML3DN3](~/samples/snippets/xaml/VS_Snippets_Wpf/Basic3D/XAML/Window1.xaml#basic3dxaml3dn3)] diff --git a/dotnet-desktop-guide/framework/wpf/graphics-multimedia/animation-overview.md b/dotnet-desktop-guide/framework/wpf/graphics-multimedia/animation-overview.md index c65e192874..d6be97b857 100644 --- a/dotnet-desktop-guide/framework/wpf/graphics-multimedia/animation-overview.md +++ b/dotnet-desktop-guide/framework/wpf/graphics-multimedia/animation-overview.md @@ -34,7 +34,7 @@ Animation on a computer is similar. For example, a program that makes a drawing - The program then updates the rectangle with the new value and redraws it. -Prior to WPF, Microsoft Windows developers had to create and manage their own timing systems or use special custom libraries. WPF includes an efficient timing system that is exposed through managed code and WPF framework. WPF animation makes it easy to animate controls and other graphical objects. +Prior to WPF, Microsoft Windows developers had to create and manage their own timing systems or use special custom libraries. WPF includes an efficient timing system that is exposed through managed code and XAML and that is deeply integrated into the WPF framework. WPF animation makes it easy to animate controls and other graphical objects. WPF handles all the behind-the-scenes work of managing a timing system and redrawing the screen efficiently. It provides timing classes that enable you to focus on the effects you want to create, instead of the mechanics of achieving those effects. WPF also makes it easy to create your own animations by exposing animation base classes from which your classes can inherit, to produce customized animations. These custom animations gain many of the performance benefits of the standard animation classes. diff --git a/dotnet-desktop-guide/framework/wpf/graphics-multimedia/how-to-animate-a-property-without-using-a-storyboard.md b/dotnet-desktop-guide/framework/wpf/graphics-multimedia/how-to-animate-a-property-without-using-a-storyboard.md index 39e3f370c7..50aa9aa0f0 100644 --- a/dotnet-desktop-guide/framework/wpf/graphics-multimedia/how-to-animate-a-property-without-using-a-storyboard.md +++ b/dotnet-desktop-guide/framework/wpf/graphics-multimedia/how-to-animate-a-property-without-using-a-storyboard.md @@ -17,7 +17,7 @@ ms.assetid: d411db70-4df7-487d-82bc-95a7c1b2e7f8 This example shows one way to apply an animation to a property without using a . > [!NOTE] -> This functionality is not available in XAML, see [Animate a Property by Using a Storyboard](how-to-animate-a-property-by-using-a-storyboard.md). +> This functionality is not available in Extensible Application Markup Language (XAML). For information about animating a property in [!INCLUDEXAML, see [Animate a Property by Using a Storyboard](how-to-animate-a-property-by-using-a-storyboard.md). To apply a local animation to a property, use the method. This method takes two parameters: a that specifies the property to animate, and the animation to apply to that property. diff --git a/dotnet-desktop-guide/framework/wpf/graphics-multimedia/multimedia-overview.md b/dotnet-desktop-guide/framework/wpf/graphics-multimedia/multimedia-overview.md index f126db91a7..0236ab33be 100644 --- a/dotnet-desktop-guide/framework/wpf/graphics-multimedia/multimedia-overview.md +++ b/dotnet-desktop-guide/framework/wpf/graphics-multimedia/multimedia-overview.md @@ -9,7 +9,7 @@ ms.assetid: feb25b15-d741-4ac3-818f-1b19f63a3562 --- # Multimedia Overview -The multimedia features in WPF. +The multimedia features in Windows Presentation Foundation (WPF) enable you to integrate audio and video into your applications to enhance the user experience. This topic introduces the multimedia features of WPF. diff --git a/dotnet-desktop-guide/framework/wpf/graphics-multimedia/tutorial-hosting-visual-objects-in-a-win32-application.md b/dotnet-desktop-guide/framework/wpf/graphics-multimedia/tutorial-hosting-visual-objects-in-a-win32-application.md index 6530703f66..15f7f16cf5 100644 --- a/dotnet-desktop-guide/framework/wpf/graphics-multimedia/tutorial-hosting-visual-objects-in-a-win32-application.md +++ b/dotnet-desktop-guide/framework/wpf/graphics-multimedia/tutorial-hosting-visual-objects-in-a-win32-application.md @@ -13,7 +13,7 @@ ms.assetid: f0e1600c-3217-43d5-875d-1864fa7fe628 --- # Tutorial: Hosting Visual Objects in a Win32 Application -WPF functionality to your application rather than rewrite your code. To provide support for Win32 and WPF graphics subsystems used concurrently in an application, WPF provides a mechanism for hosting objects in a Win32 window. +Windows Presentation Foundation (WPF) provides a rich environment for creating applications. However, when you have a substantial investment in Win32 code, it might be more effective to add WPF functionality to your application rather than rewrite your code. To provide support for Win32 and WPF graphics subsystems used concurrently in an application, WPF provides a mechanism for hosting objects in a Win32 window. This tutorial describes how to write a sample application, [Hit Test with Win32 Interoperation Sample](https://github.com/microsoft/WPF-Samples/tree/master/Visual%20Layer/VisualsHitTesting), that hosts WPF visual objects in a Win32 window. diff --git a/dotnet-desktop-guide/framework/wpf/graphics-multimedia/wpf-brushes-overview.md b/dotnet-desktop-guide/framework/wpf/graphics-multimedia/wpf-brushes-overview.md index 58ef55e240..93c744734b 100644 --- a/dotnet-desktop-guide/framework/wpf/graphics-multimedia/wpf-brushes-overview.md +++ b/dotnet-desktop-guide/framework/wpf/graphics-multimedia/wpf-brushes-overview.md @@ -11,7 +11,7 @@ ms.assetid: ecea1955-420b-45c6-bf43-c1404c072c41 --- # WPF Brushes Overview -Everything visible on your screen is visible because it was painted by a brush. For example, a brush is used to describe the background of a button, the foreground of text, and the fill of a shape. This topic introduces the concepts of painting with user interface (UI) objects with anything from simple, solid colors to complex sets of patterns and images. +Everything visible on your screen is visible because it was painted by a brush. For example, a brush is used to describe the background of a button, the foreground of text, and the fill of a shape. This topic introduces the concepts of painting with Windows Presentation Foundation (WPF) brushes and provides examples. Brushes enable you to paint user interface (UI) objects with anything from simple, solid colors to complex sets of patterns and images.