From b15f487e508b41104ff68dd8d7d9293ecb62eb47 Mon Sep 17 00:00:00 2001 From: Martin Zikmund Date: Wed, 6 Dec 2023 16:58:04 -0500 Subject: [PATCH] fix: Set top level class name for ResourceDictionary with code-behind --- .../Uno.UI.SourceGenerators/XamlGenerator/XamlFileGenerator.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/SourceGenerators/Uno.UI.SourceGenerators/XamlGenerator/XamlFileGenerator.cs b/src/SourceGenerators/Uno.UI.SourceGenerators/XamlGenerator/XamlFileGenerator.cs index 61a352e5f373..0150fe649412 100644 --- a/src/SourceGenerators/Uno.UI.SourceGenerators/XamlGenerator/XamlFileGenerator.cs +++ b/src/SourceGenerators/Uno.UI.SourceGenerators/XamlGenerator/XamlFileGenerator.cs @@ -353,6 +353,7 @@ private SourceText InnerGenerateFile() if (topLevelControl.Type.Name == "ResourceDictionary") { _isTopLevelDictionary = true; + _xClassName = FindClassName(topLevelControl); using (TrySetDefaultBindMode(topLevelControl)) {