diff --git a/src/SamplesApp/UITests.Shared/UITests.Shared.projitems b/src/SamplesApp/UITests.Shared/UITests.Shared.projitems index dfb912dfbcac..7be00a9400c5 100644 --- a/src/SamplesApp/UITests.Shared/UITests.Shared.projitems +++ b/src/SamplesApp/UITests.Shared/UITests.Shared.projitems @@ -3793,6 +3793,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile @@ -6094,6 +6098,9 @@ Path_ClearData.xaml + + Path_Custom.xaml + Path_Geometries.xaml diff --git a/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Shapes/Path_Custom.xaml b/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Shapes/Path_Custom.xaml new file mode 100644 index 000000000000..8a7a7958767b --- /dev/null +++ b/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Shapes/Path_Custom.xaml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Shapes/Path_Custom.xaml.cs b/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Shapes/Path_Custom.xaml.cs new file mode 100644 index 000000000000..6f8ef6d390fe --- /dev/null +++ b/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Shapes/Path_Custom.xaml.cs @@ -0,0 +1,23 @@ +using Uno.UI.Samples.Controls; +using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml.Shapes; + +namespace UITests.Windows_UI_Xaml_Shapes +{ + [Sample("Shapes")] + public sealed partial class Path_Custom : Page + { + public Path_Custom() + { + this.InitializeComponent(); + } + } + +//#if __WASM__ +// [Uno.UI.Runtime.WebAssembly.HtmlElement("svg")] +//#endif + public partial class MyPath : Path + { + + } +} diff --git a/src/Uno.UI/UI/Xaml/UIElement.wasm.cs b/src/Uno.UI/UI/Xaml/UIElement.wasm.cs index 4bfd1f29ccd6..351e9f7b5d88 100644 --- a/src/Uno.UI/UI/Xaml/UIElement.wasm.cs +++ b/src/Uno.UI/UI/Xaml/UIElement.wasm.cs @@ -128,7 +128,8 @@ private string GetHtmlTag(string htmlTag) if (!_htmlTagCache.TryGetValue(currentType, out var htmlTagOverride)) { - htmlTagOverride = DefaultHtmlTag; + // Set the tag of the parent class to default. + htmlTagOverride = htmlTag; if (currentType.GetCustomAttribute(_htmlElementAttribute) is Attribute attr) {