From c72686fcf388e74c03d1c02b78c8f907cc895904 Mon Sep 17 00:00:00 2001 From: Kent Sharkey Date: Fri, 11 Jun 2021 15:35:01 -0700 Subject: [PATCH] LinkFix: .NET desktop (2021-05) (#1076) * LinkFix: .NET desktop (2021-05) * Apply suggestions from code review Co-authored-by: Andy (Steve) De George <67293991+adegeo@users.noreply.github.com> Co-authored-by: Andy (Steve) De George <67293991+adegeo@users.noreply.github.com> --- .../xaml-services/xdata-intrinsic-xaml-type.md | 4 ++-- dotnet-desktop-guide/xaml-services/xname-directive.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dotnet-desktop-guide/xaml-services/xdata-intrinsic-xaml-type.md b/dotnet-desktop-guide/xaml-services/xdata-intrinsic-xaml-type.md index 1a54626..9e1ef5a 100644 --- a/dotnet-desktop-guide/xaml-services/xdata-intrinsic-xaml-type.md +++ b/dotnet-desktop-guide/xaml-services/xdata-intrinsic-xaml-type.md @@ -41,12 +41,12 @@ Programmatic access to XML data and the `x:XData` intrinsic XAML type is possibl The `x:XData` object is primarily used as a child object of an , or alternatively, as the child object of the property (in XAML, this is typically expressed in property element syntax). -The data should typically redefine the base XML namespace within the data island to be a new default XML namespace (set to an empty string). This is easiest for simple data islands because the expressions that are used to reference and bind to the data can avoid inclusion of prefixes. More complex data islands might define multiple prefixes for the data and use a specific prefix for the XML namespace at the root. In this case, all expression references should include the appropriate namespace-mapped prefix. For more information, see [Data Binding Overview](../net/wpf/data/data-binding-overview.md). +The data should typically redefine the base XML namespace within the data island to be a new default XML namespace (set to an empty string). This is easiest for simple data islands because the expressions that are used to reference and bind to the data can avoid inclusion of prefixes. More complex data islands might define multiple prefixes for the data and use a specific prefix for the XML namespace at the root. In this case, all expression references should include the appropriate namespace-mapped prefix. For more information, see [Data Binding Overview](../net/wpf/data/index.md?view=netdesktop-5.0&preserve-view=true). Technically, `x:XData` can be used as the content of any property of type . However, is the only prominent implementation. ## See also - -- [Data Binding Overview](../net/wpf/data/data-binding-overview.md) +- [Data Binding Overview](../net/wpf/data/index.md?view=netdesktop-5.0&preserve-view=true) - [Binding Markup Extension](../framework/wpf/advanced/binding-markup-extension.md) diff --git a/dotnet-desktop-guide/xaml-services/xname-directive.md b/dotnet-desktop-guide/xaml-services/xname-directive.md index 7d52f4f..b86d0fe 100644 --- a/dotnet-desktop-guide/xaml-services/xname-directive.md +++ b/dotnet-desktop-guide/xaml-services/xname-directive.md @@ -47,7 +47,7 @@ Under the standard build configuration for a [!INCLUDE[TLA2#tla_winclient](../in For a WPF application that uses the Microsoft Visual Basic targets and includes XAML files with `Page` build action, a separate reference property is created during compilation that adds the `WithEvents` keyword to all elements that have an `x:Name`, to support `Handles` syntax for event handler delegates. This property is always public. For more information, see [Visual Basic and WPF Event Handling](../framework/wpf/advanced/visual-basic-and-wpf-event-handling.md). -`x:Name` is used by the WPF XAML processor to register a name into a XAML namescope at load time, even for cases where the page is not markup-compiled by build actions (for example, loose XAML of a resource dictionary). One reason for this behavior is because the `x:Name` is potentially needed for binding. For details, see [Data Binding Overview](../net/wpf/data/data-binding-overview.md). +`x:Name` is used by the WPF XAML processor to register a name into a XAML namescope at load time, even for cases where the page is not markup-compiled by build actions (for example, loose XAML of a resource dictionary). One reason for this behavior is because the `x:Name` is potentially needed for binding. For details, see [Data Binding Overview](../net/wpf/data/index.md?view=netdesktop-5.0&preserve-view=true). As mentioned previously, `x:Name` (or `Name`) should not be applied in situations that also use `x:Key`. The [!INCLUDE[TLA2#tla_winclient](../includes/tla2sharptla-winclient-md.md)] has a special behavior of defining itself as a XAML namescope but returning Not Implemented or null values for APIs as a way to enforce this behavior. If the WPF XAML parser encounters `Name` or `x:Name` in a XAML-defined , the name is not added to any XAML namescope. Attempting to find that name from any XAML namescope and the `FindName` methods will not return valid results.