Repository navigation
fix: Align FindName behavior with WinUI - #16177
Youssef1313 wants to merge 10 commits into
Conversation
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-16177/index.html |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-16177/index.html |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-16177/index.html |
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-16177/index.html |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-16177/index.html |
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-16177/index.html |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-16177/index.html |
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-16177/index.html |
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-16177/index.html |
|
When continuing fixing FindName, make sure to test this scenario: MainWindow.xaml: <Window
x:Class="App6.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:App6"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<StackPanel x:Name="inWindow1">
<Button x:Name="inWindow2" />
<local:MyComponent x:Name="inWindow3" />
</StackPanel>
</Window>
MyComponent.xaml: <Page
x:Class="App6.MyComponent"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:App6"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" x:Name="componentRoot">
<Grid x:Name="inComponent1" x:FieldModifier="public">
<Button x:Name="inComponent2" x:FieldModifier="public" />
</Grid>
</Page>MainWindow.xaml.cs: using System;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Data;
using Microsoft.UI.Xaml.Markup;
namespace App6;
public sealed partial class MainWindow : Window
{
public MainWindow()
{
this.InitializeComponent();
this.inWindow1.Loaded += InWindow1_Loaded;
}
private void InWindow1_Loaded(object sender, RoutedEventArgs e)
{
var x1 = inWindow1.FindName("inWindow1");
var x2 = inWindow1.FindName("inWindow2");
var x3 = inWindow1.FindName("inWindow3");
var x4 = inWindow1.FindName("componentRoot");
var x5 = inWindow1.FindName("inComponent1");
var x6 = inWindow1.FindName("inComponent2");
var y1 = inWindow2.FindName("inWindow1");
var y2 = inWindow2.FindName("inWindow2");
var y3 = inWindow2.FindName("inWindow3");
var y4 = inWindow2.FindName("componentRoot");
var y5 = inWindow2.FindName("inComponent1");
var y6 = inWindow2.FindName("inComponent2");
var z1 = inWindow3.FindName("inWindow1");
var z2 = inWindow3.FindName("inWindow2");
var z3 = inWindow3.FindName("inWindow3");
var z4 = inWindow3.FindName("componentRoot");
var z5 = inWindow3.FindName("inComponent1");
var z6 = inWindow3.FindName("inComponent2");
var a1 = inWindow3.inComponent1.FindName("inWindow1");
var a2 = inWindow3.inComponent1.FindName("inWindow2");
var a3 = inWindow3.inComponent1.FindName("inWindow3");
var a4 = inWindow3.inComponent1.FindName("componentRoot");
var a5 = inWindow3.inComponent1.FindName("inComponent1");
var a6 = inWindow3.inComponent1.FindName("inComponent2");
var b1 = inWindow3.inComponent1.FindName("inWindow1");
var b2 = inWindow3.inComponent1.FindName("inWindow2");
var b3 = inWindow3.inComponent1.FindName("inWindow3");
var b4 = inWindow3.inComponent1.FindName("componentRoot");
var b5 = inWindow3.inComponent1.FindName("inComponent1");
var b6 = inWindow3.inComponent1.FindName("inComponent2");
}
}MyComponent.xaml.cs: using Microsoft.UI.Xaml.Controls;
namespace App6;
public sealed partial class MyComponent : Page
{
public MyComponent()
{
this.InitializeComponent();
}
} |
|
This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or it will be closed in 10 days. |
|
This PR was closed because it has been stalled for 10 days with no activity. |
|
This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or it will be closed in 10 days. |
|
This PR was closed because it has been stalled for 10 days with no activity. |
GitHub Issue (If applicable): closes #7043 closes #14663
PR Type
What kind of change does this PR introduce?
What is the current behavior?
What is the new behavior?
PR Checklist
Please check if your PR fulfills the following requirements:
Screenshots Compare Test Runresults.Other information
Internal Issue (If applicable):