Skip to content

Fix for Bug 2761 (AppThemeResource not finding keys)#3159

Merged
bijington merged 3 commits intoCommunityToolkit:mainfrom
misterspeak:main
Mar 21, 2026
Merged

Fix for Bug 2761 (AppThemeResource not finding keys)#3159
bijington merged 3 commits intoCommunityToolkit:mainfrom
misterspeak:main

Conversation

@misterspeak
Copy link
Copy Markdown
Contributor

Description of Change

Modified AppThemeResourceExtension.shared.cs to handle application level root (returns as a ResourceDictionary, as opposed to an IResourcesProvider which is returned for page level resources).

Unit Test AppThemeResourceExtensionTests.cs added.

New Resource Dictionary AppThemeResourceDictionary.xaml provided for use with unit test.

No sample needed.

Linked Issues

#2761

Additional information

Tested on Windows11 only as this should be platform agnostic?

@misterspeak
Copy link
Copy Markdown
Contributor Author

@dotnet-policy-service agree
@dotnet-policy-service agree company="Microsoft"

Copy link
Copy Markdown
Contributor

@bijington bijington left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@misterspeak thank you for this. Just 2 pretty small comments but the rest looks good to me.

Comment thread src/CommunityToolkit.Maui.UnitTests/CommunityToolkit.Maui.UnitTests.csproj Outdated
Comment thread src/CommunityToolkit.Maui/Extensions/AppThemeResourceExtension.shared.cs Outdated
Copy link
Copy Markdown
Contributor

@bijington bijington left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this @misterspeak

@bijington bijington enabled auto-merge (squash) March 20, 2026 21:08
@bijington bijington merged commit 7673f28 into CommunityToolkit:main Mar 21, 2026
10 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Mar 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] AppThemeColor Resource not found for key in v12.0.0

2 participants