npx claudepluginhub davidortinau/maui-skills --plugin maui-skillsThis skill uses the workspace's default tool permissions.
| Issue | Fix |
Implements light/dark mode theming in .NET MAUI apps using AppThemeBinding, ResourceDictionary switching, DynamicResource bindings, system theme detection, and user preferences.
Localizes WPF applications using resource files, x:Uid, BAML, and culture settings for multi-language support and right-to-left layouts.
Guides .NET MAUI app theming with light/dark modes, AppThemeBinding, dynamic resources, ResourceDictionary switching, and system theme detection.
Share bugs, ideas, or general feedback.
| Issue | Fix |
|---|---|
ResourceManager returns null for default culture | Set <NeutralLanguage>en-US</NeutralLanguage> in .csproj |
| iOS ignores culture overrides | CFBundleLocalizations missing from Info.plist |
| Windows doesn't show correct language | <Resource Language="..." /> missing from Package.appxmanifest |
x:Static bindings don't update on language switch | x:Static is one-time — use binding approach with INotifyPropertyChanged |
.Designer.cs not regenerating in VS Code | Add <CoreCompileDependsOn>PrepareResources;$(CoreCompileDependsOn)</CoreCompileDependsOn> and run dotnet build |
<!-- ✅ Always set in .csproj -->
<PropertyGroup>
<NeutralLanguage>en-US</NeutralLanguage>
</PropertyGroup>
<!-- ❌ Missing this causes ResourceManager to return null at runtime -->
⚠️ Without this, iOS won't offer your app's languages in system Settings:
<!-- Platforms/iOS/Info.plist AND Platforms/MacCatalyst/Info.plist -->
<key>CFBundleLocalizations</key>
<array>
<string>en</string>
<string>es</string>
<string>fr</string>
</array>
<!-- Platforms/Windows/Package.appxmanifest -->
<Resources>
<Resource Language="en-US" />
<Resource Language="es" />
<Resource Language="fr-FR" />
</Resources>
Android picks up .resx-based localization automatically. No additional manifest entries required. ✅
<!-- ❌ Won't update when language changes at runtime -->
<Label Text="{x:Static resx:AppResources.WelcomeMessage}" />
<!-- ✅ Updates dynamically via INotifyPropertyChanged -->
<Label Text="{Binding [WelcomeMessage], Source={x:Static local:LocalizationResourceManager.Instance}}" />
When switching culture, set all three properties or formatting is inconsistent:
// ✅ Complete culture switch
var culture = new CultureInfo("es");
CultureInfo.CurrentUICulture = culture; // resource lookup
CultureInfo.CurrentCulture = culture; // dates/numbers
AppResources.Culture = culture; // ResourceManager
// ❌ Only sets UI culture — dates/numbers stay in old culture
CultureInfo.CurrentUICulture = new CultureInfo("es");
<!-- ✅ Page-level — children inherit -->
<ContentPage FlowDirection="RightToLeft">
<StackLayout FlowDirection="MatchParent" />
</ContentPage>
<!-- ❌ Only on child — parent still LTR, layout breaks -->
<ContentPage>
<StackLayout FlowDirection="RightToLeft" />
</ContentPage>
⚠️ .Designer.cs may not regenerate on save. Add to .csproj and run dotnet build after .resx changes:
<CoreCompileDependsOn>PrepareResources;$(CoreCompileDependsOn)</CoreCompileDependsOn>
| Need | Approach |
|---|---|
| Static multilingual strings | .resx files with x:Static bindings |
| Runtime language switching | LocalizationResourceManager with INotifyPropertyChanged bindings |
| Culture-specific images | Name images banner_{culture}.png or store paths in .resx |
| RTL support | Set FlowDirection at page level, detect with TextInfo.IsRightToLeft |
| Date/number formatting | Set CultureInfo.CurrentCulture alongside CurrentUICulture |
NeutralLanguage set in .csprojAppResources.resx contains all keysAppResources.{culture}.resxCFBundleLocalizations lists all supported languagesPackage.appxmanifest declares <Resource Language="..." />FlowDirection at page/app levelCurrentUICulture, CurrentCulture, AppResources.Culturedotnet build regenerates .Designer.cs after .resx changes