Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(hr): Add ability to remove root of a DataTemplate with HR without cnomua #19229

Merged
merged 4 commits into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,18 @@ public record DiagnosticsResult(string Id);
foreach (var scenarioFolder in Directory.EnumerateDirectories(ScenariosFolder, "*.*", SearchOption.TopDirectoryOnly))
{
var scenarioName = Path.GetFileName(scenarioFolder);
var path = Path.Combine(scenarioFolder, "Scenario.json");
var scenarioConfig = Path.Combine(scenarioFolder, "Scenario.json");

#if DEBUG && false
if (!path.Contains("When_Base_Type_Grid_To_Page"))
if (!scenarioName.Contains("When_DataTemplate_Event_Add"))
{
continue;
}
#endif

if (File.Exists(path))
if (File.Exists(scenarioConfig))
{
var scenariosDescriptor = ReadScenarioConfig(path);
var scenariosDescriptor = ReadScenarioConfig(scenarioConfig);

if (scenariosDescriptor is not null)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<Page x:Class="Test01.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Test01"
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">

<Page.Resources>
<DataTemplate x:Key="MyDataTemplate" />
</Page.Resources>

<Grid>
<ContentPresenter Content="Hello" ContentTemplate="{StaticResource MyDataTemplate}" />
</Grid>
</Page>
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Controls.Primitives;
using Microsoft.UI.Xaml.Data;
using Microsoft.UI.Xaml.Input;
using Microsoft.UI.Xaml.Media;
using Microsoft.UI.Xaml.Navigation;

namespace Test01;

public sealed partial class MainPage : Page
{
public MainPage()
{
this.InitializeComponent();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<Page x:Class="Test01.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Test01"
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">

<Page.Resources>
<DataTemplate x:Key="MyDataTemplate">
<TextBlock Text="DataTemplateRoot" />
</DataTemplate>
</Page.Resources>

<Grid>
<ContentPresenter Content="Hello" ContentTemplate="{StaticResource MyDataTemplate}" />
</Grid>
</Page>
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Controls.Primitives;
using Microsoft.UI.Xaml.Data;
using Microsoft.UI.Xaml.Input;
using Microsoft.UI.Xaml.Media;
using Microsoft.UI.Xaml.Navigation;

namespace Test01;

public sealed partial class MainPage : Page
{
public MainPage()
{
this.InitializeComponent();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"Scenarios": [
{
"IsDebug": true,
"IsMono": false,
"PassResults": [
{
"MetadataUpdates": 1,
"Diagnostics": []
}
]
},
{
"IsDebug": true,
"IsMono": true,
"PassResults": [
{
"MetadataUpdates": 1,
"Diagnostics": []
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<Page x:Class="Test01.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Test01"
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">

<Page.Resources>
<DataTemplate x:Key="MyDataTemplate" />
</Page.Resources>

<Grid>
<ContentPresenter Content="Hello" ContentTemplate="{StaticResource MyDataTemplate}" />
</Grid>
</Page>
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Controls.Primitives;
using Microsoft.UI.Xaml.Data;
using Microsoft.UI.Xaml.Input;
using Microsoft.UI.Xaml.Media;
using Microsoft.UI.Xaml.Navigation;

namespace Test01;

public sealed partial class MainPage : Page
{
public MainPage()
{
this.InitializeComponent();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<Page x:Class="Test01.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Test01"
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">

<Page.Resources>
<DataTemplate x:Key="MyDataTemplate">
<TextBlock Text="DataTemplateRoot" />
</DataTemplate>
</Page.Resources>

<Grid>
<ContentPresenter Content="Hello" ContentTemplate="{StaticResource MyDataTemplate}" />
</Grid>
</Page>
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Controls.Primitives;
using Microsoft.UI.Xaml.Data;
using Microsoft.UI.Xaml.Input;
using Microsoft.UI.Xaml.Media;
using Microsoft.UI.Xaml.Navigation;

namespace Test01;

public sealed partial class MainPage : Page
{
public MainPage()
{
this.InitializeComponent();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<Page x:Class="Test01.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Test01"
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">

<Page.Resources>
<DataTemplate x:Key="MyDataTemplate" />
</Page.Resources>

<Grid>
<ContentPresenter Content="Hello" ContentTemplate="{StaticResource MyDataTemplate}" />
</Grid>
</Page>
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Controls.Primitives;
using Microsoft.UI.Xaml.Data;
using Microsoft.UI.Xaml.Input;
using Microsoft.UI.Xaml.Media;
using Microsoft.UI.Xaml.Navigation;

namespace Test01;

public sealed partial class MainPage : Page
{
public MainPage()
{
this.InitializeComponent();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"Scenarios": [
{
"IsDebug": true,
"IsMono": false,
"PassResults": [
{
"MetadataUpdates": 1,
"Diagnostics": []
},
{
"MetadataUpdates": 1,
"Diagnostics": []
}
]
},
{
"IsDebug": true,
"IsMono": true,
"PassResults": [
{
"MetadataUpdates": 1,
"Diagnostics": []
},
{
"MetadataUpdates": 1,
"Diagnostics": []
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<Page x:Class="Test01.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Test01"
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">

<Page.Resources>
<DataTemplate x:Key="MyDataTemplate">
<TextBlock Text="DataTemplateRoot" />
</DataTemplate>
</Page.Resources>

<Grid>
<ContentPresenter Content="Hello" ContentTemplate="{StaticResource MyDataTemplate}" />
</Grid>
</Page>
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Controls.Primitives;
using Microsoft.UI.Xaml.Data;
using Microsoft.UI.Xaml.Input;
using Microsoft.UI.Xaml.Media;
using Microsoft.UI.Xaml.Navigation;

namespace Test01;

public sealed partial class MainPage : Page
{
public MainPage()
{
this.InitializeComponent();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<Page x:Class="Test01.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Test01"
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">

<Page.Resources>
<DataTemplate x:Key="MyDataTemplate" />
</Page.Resources>

<Grid>
<ContentPresenter Content="Hello" ContentTemplate="{StaticResource MyDataTemplate}" />
</Grid>
</Page>
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Controls.Primitives;
using Microsoft.UI.Xaml.Data;
using Microsoft.UI.Xaml.Input;
using Microsoft.UI.Xaml.Media;
using Microsoft.UI.Xaml.Navigation;

namespace Test01;

public sealed partial class MainPage : Page
{
public MainPage()
{
this.InitializeComponent();
}
}
Loading
Loading