Skip to content

Commit

Permalink
Update the nuget readme with instructions of how to do app level over…
Browse files Browse the repository at this point in the history
…rides 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 <[email protected]>

Co-authored-by: Marcel Wagner <[email protected]>
  • Loading branch information
StephenLPeters and marcelwgn authored Feb 27, 2021
1 parent 059fefb commit 4292f2b
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions build/NuSpecs/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,20 @@ Don't forget to set XamlControlsResources as your Application resources in App.x
</Application.Resources>
</Application>

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

<Application
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.UI.Xaml.Controls">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
<!-- Other merged dictionaries here -->
</ResourceDictionary.MergedDictionaries>
<!-- Other app resources here -->
</ResourceDictionary>
<controls:XamlControlsResources>
<controls:XamlControlsResources.MergedDictionaries>
<!-- Other app resources here -->
</controls:XamlControlsResources.MergedDictionaries>
</controls:XamlControlsResources>
</Application.Resources>
</Application>

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

0 comments on commit 4292f2b

Please sign in to comment.