Skip to content

Commit e76c7ec

Browse files
dr1rrbjeromelaban
authored andcommitted
fix: Fix Xaml merge task not supproting conditional namespaces
1 parent 6bf96e5 commit e76c7ec

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/SourceGenerators/Uno.UI.Tasks/BatchMergeXaml/MergedDictionary.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ private MergedDictionary(XmlDocument document, MergedDictionary parentDictionary
108108
mergedThemeDictionaryByKeyDictionary = new Dictionary<string, MergedDictionary>();
109109
namespaceList = new List<string>();
110110
this.parentDictionary = parentDictionary;
111+
112+
AddNamespace("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
113+
xmlElement.SetAttribute("Ignorable", "http://schemas.openxmlformats.org/markup-compatibility/2006", "ios android wasm skia");
111114
}
112115

113116
private void AddNamespace(string xmlnsString, string namespaceString)

src/Uno.UI.FluentTheme/themeresources.xaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<ResourceDictionary xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:media="using:Microsoft.UI.Xaml.Media" xmlns:controls="using:Microsoft.UI.Xaml.Controls" xmlns:primitives="using:Microsoft.UI.Xaml.Controls.Primitives" xmlns:wasm="http://uno.ui/wasm" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:uno="using:Uno.UI.Xaml.Controls" xmlns:automation="clr-namespace:Windows.UI.Xaml.Automation" xmlns:not_mux="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:contract4Present="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract,4)" xmlns:contract7Present="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract,7)" xmlns:contract7NotPresent="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractNotPresent(Windows.Foundation.UniversalApiContract,7)" xmlns:primitiveContract7Present="using:Microsoft.UI.Xaml.Controls.Primitives?IsApiContractPresent(Windows.Foundation.UniversalApiContract,7)" xmlns:contract4NotPresent="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractNotPresent(Windows.Foundation.UniversalApiContract,4)" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:unouwp="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractNotPresent(Uno.WinUI,1)" xmlns:win="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:contract6Present="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract,6)" xmlns:ios="http://platform.uno/ios" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
1+
<ResourceDictionary xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="ios android wasm skia" xmlns:media="using:Microsoft.UI.Xaml.Media" xmlns:controls="using:Microsoft.UI.Xaml.Controls" xmlns:primitives="using:Microsoft.UI.Xaml.Controls.Primitives" xmlns:wasm="http://uno.ui/wasm" xmlns:uno="using:Uno.UI.Xaml.Controls" xmlns:automation="clr-namespace:Windows.UI.Xaml.Automation" xmlns:not_mux="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:contract4Present="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract,4)" xmlns:contract7Present="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract,7)" xmlns:contract7NotPresent="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractNotPresent(Windows.Foundation.UniversalApiContract,7)" xmlns:primitiveContract7Present="using:Microsoft.UI.Xaml.Controls.Primitives?IsApiContractPresent(Windows.Foundation.UniversalApiContract,7)" xmlns:contract4NotPresent="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractNotPresent(Windows.Foundation.UniversalApiContract,4)" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:unouwp="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractNotPresent(Uno.WinUI,1)" xmlns:win="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:contract6Present="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract,6)" xmlns:ios="http://platform.uno/ios" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
22
<ResourceDictionary.ThemeDictionaries>
3-
<ResourceDictionary x:Key="Default">
3+
<ResourceDictionary xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="ios android wasm skia" x:Key="Default">
44
<SolidColorBrush x:Key="SystemControlTransparentBrush" Color="Transparent" />
55
<x:Boolean x:Key="UseSystemFocusVisuals">True</x:Boolean>
66
<Thickness x:Key="TextControlBorderThemeThickness">1</Thickness>
@@ -1481,7 +1481,7 @@
14811481
<Thickness x:Key="TreeViewItemBorderThemeThickness">1</Thickness>
14821482
<x:Double x:Key="TreeViewItemMinHeight">32</x:Double>
14831483
</ResourceDictionary>
1484-
<ResourceDictionary x:Key="Light">
1484+
<ResourceDictionary xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="ios android wasm skia" x:Key="Light">
14851485
<SolidColorBrush x:Key="SystemControlTransparentBrush" Color="Transparent" />
14861486
<x:Boolean x:Key="UseSystemFocusVisuals">True</x:Boolean>
14871487
<Thickness x:Key="TextControlBorderThemeThickness">1</Thickness>
@@ -2962,7 +2962,7 @@
29622962
<Thickness x:Key="TreeViewItemBorderThemeThickness">1</Thickness>
29632963
<x:Double x:Key="TreeViewItemMinHeight">32</x:Double>
29642964
</ResourceDictionary>
2965-
<ResourceDictionary x:Key="HighContrast">
2965+
<ResourceDictionary xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="ios android wasm skia" x:Key="HighContrast">
29662966
<SolidColorBrush x:Key="SystemControlTransparentBrush" Color="Transparent" />
29672967
<x:Boolean x:Key="UseSystemFocusVisuals">True</x:Boolean>
29682968
<Thickness x:Key="TextControlBorderThemeThickness">1</Thickness>

0 commit comments

Comments
 (0)