Skip to content

Commit 4292f2b

Browse files
Update the nuget readme with instructions of how to do app level overrides of Winui2 resources. (#4279)
* Update the nuget readme with instuctions of how to do app level overrides of Winui2 resources. * Fix some mistakes * Fix the root of the overrides example * Update build/NuSpecs/readme.txt Co-authored-by: Marcel Wagner <marcel.alex.wagner@outlook.com> Co-authored-by: Marcel Wagner <marcel.alex.wagner@outlook.com>
1 parent 059fefb commit 4292f2b

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

build/NuSpecs/readme.txt

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,20 @@ Don't forget to set XamlControlsResources as your Application resources in App.x
88
</Application.Resources>
99
</Application>
1010

11-
or if you have other resources then add XamlControlsResources at the top as a merged dictionary:
11+
If you have other resources, then we recommend you add those to the XamlControlsResources' MergedDictionaries.
12+
This works with the platform's resource system to allow overrides of the XamlControlsResources resources.
1213

14+
<Application
15+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
16+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
17+
xmlns:controls="using:Microsoft.UI.Xaml.Controls">
1318
<Application.Resources>
14-
<ResourceDictionary>
15-
<ResourceDictionary.MergedDictionaries>
16-
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
17-
<!-- Other merged dictionaries here -->
18-
</ResourceDictionary.MergedDictionaries>
19-
<!-- Other app resources here -->
20-
</ResourceDictionary>
19+
<controls:XamlControlsResources>
20+
<controls:XamlControlsResources.MergedDictionaries>
21+
<!-- Other app resources here -->
22+
</controls:XamlControlsResources.MergedDictionaries>
23+
</controls:XamlControlsResources>
2124
</Application.Resources>
25+
</Application>
2226

2327
See http://aka.ms/winui for more information.

0 commit comments

Comments
 (0)