Skip to content

Commit 7775f78

Browse files
don't ask
1 parent 6372d0b commit 7775f78

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Controls/src/SourceGen/CodeBehindGenerator.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ static string EscapeIdentifier(string identifier)
172172

173173
var nsmgr = new XmlNamespaceManager(new NameTable());
174174
nsmgr.AddNamespace("__f__", XamlParser.MauiUri);
175+
nsmgr.AddNamespace("__g__", XamlParser.MauiGlobalUri);
175176
if (allowImplicitXmlns)
176177
{
177178
nsmgr.AddNamespace("", XamlParser.DefaultImplicitUri);
@@ -564,7 +565,8 @@ static bool GetXamlCompilationProcessingInstruction(XmlDocument xmlDoc)
564565
XmlNodeList names =
565566
root.SelectNodes(
566567
"//*[@" + xPrefix + ":Name" +
567-
"][not(ancestor:: __f__:DataTemplate) and not(ancestor:: __f__:ControlTemplate) and not(ancestor:: __f__:Style) and not(ancestor:: __f__:VisualStateManager.VisualStateGroups)]", nsmgr);
568+
"][not(ancestor:: __f__:DataTemplate) and not(ancestor:: __f__:ControlTemplate) and not(ancestor:: __f__:Style) and not(ancestor:: __f__:VisualStateManager.VisualStateGroups)" +
569+
"and not(ancestor:: __g__:DataTemplate) and not(ancestor:: __g__:ControlTemplate) and not(ancestor:: __g__:Style) and not(ancestor:: __g__:VisualStateManager.VisualStateGroups)]", nsmgr);
568570
foreach (XmlNode node in names)
569571
{
570572
cancellationToken.ThrowIfCancellationRequested();

0 commit comments

Comments
 (0)