mirror of
https://github.com/Stone-Red-Code/docs-desktop.git
synced 2026-09-09 23:43:28 +02:00
LinkFix: .NET desktop (2021-05) (#1076)
* LinkFix: .NET desktop (2021-05) * Apply suggestions from code review Co-authored-by: Andy (Steve) De George <[email protected]> Co-authored-by: Andy (Steve) De George <[email protected]>
This commit is contained in:
co-authored by
Andy De George
parent
7d8d3d1e22
commit
c72686fcf3
@@ -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 <xref:System.Windows.Data.Binding.ElementName%2A> 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 <xref:System.Windows.Data.Binding.ElementName%2A> 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)] <xref:System.Windows.ResourceDictionary> has a special behavior of defining itself as a XAML namescope but returning Not Implemented or null values for <xref:System.Windows.Markup.INameScope> APIs as a way to enforce this behavior. If the WPF XAML parser encounters `Name` or `x:Name` in a XAML-defined <xref:System.Windows.ResourceDictionary>, 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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user