[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6DZFZPJD4TBBAFFEX4SMX27":3,"skill-same:01M6DZFZPJD4TBBAFFEX4SMX27":86},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":47,"linkOnly":48,"markdownContent":49,"markdownBody":50,"frontMatter":51,"refName":52,"commitSha":53,"skillDirectory":54,"forksCount":55,"repositoryHtmlUrl":56,"repositoryHomepageUrl":57,"ownerHtmlUrl":58,"ownerBlogUrl":59,"ownerDescription":60,"updatedAt":61,"install":62,"resources":75},"01M6DZFZPJD4TBBAFFEX4SMX27","maui-theming",null,"Guide for theming .NET MAUI apps — light\u002Fdark mode via AppThemeBinding, ResourceDictionary theme switching, DynamicResource bindings, system theme detection, and user theme preferences. Use when: \"dark mode\", \"light mode\", \"theming\", \"AppThemeBinding\", \"theme switching\", \"ResourceDictionary theme\", \"dynamic resources\", \"system theme detection\", \"color scheme\", \"app theme\", \"DynamicResource\". Do not use for: localization or language switching (see .NET MAUI localization documentation), accessibility visual adjustments (see .NET MAUI accessibility documentation), app icons or splash screens (see .NET MAUI app icons documentation), or Bootstrap-style class theming (see Plugin.Maui.BootstrapTheme NuGet package).","managedcode\u002Fdotnet-skills","managedcode","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F78253589?v=4","01M6DYDJR3EG8KB5G4PC65XCTT","Managed Code","01M6DYDJX0ZT432N04NYJW89DN",512,"MIT","https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fexternal-sources\u002Fupstreams\u002Fdotnet-skills\u002Fplugins\u002Fdotnet-maui\u002Fskills\u002Fmaui-theming\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],"theming","maui theming","maui","app","when","dark","for","mode","splash","theme","color","resources","apps","dark mode","documentation","localization","switching","visual","do","dynamic resources","use","guide","system","preferences","package","icons","bootstrap","plugin","2026-11-10 10:12:30",false,"---\nname: maui-theming\ndescription: >-\n  Guide for theming .NET MAUI apps — light\u002Fdark mode via AppThemeBinding,\n  ResourceDictionary theme switching, DynamicResource bindings, system theme\n  detection, and user theme preferences.\n  Use when: \"dark mode\", \"light mode\", \"theming\", \"AppThemeBinding\",\n  \"theme switching\", \"ResourceDictionary theme\", \"dynamic resources\",\n  \"system theme detection\", \"color scheme\", \"app theme\", \"DynamicResource\".\n  Do not use for: localization or language switching (see .NET MAUI localization\n  documentation), accessibility visual adjustments (see .NET MAUI accessibility\n  documentation), app icons or splash screens (see .NET MAUI app icons\n  documentation), or Bootstrap-style class theming (see Plugin.Maui.BootstrapTheme\n  NuGet package).\nlicense: MIT\n---\n\n# .NET MAUI Theming\n\nApply light\u002Fdark mode support, custom branded themes, and runtime theme switching in .NET MAUI apps using AppThemeBinding, ResourceDictionary swapping, and system theme detection APIs.\n\n## When to Use\n\n- Adding light and dark mode support to a .NET MAUI app\n- Creating custom branded themes with ResourceDictionary\n- Detecting and responding to system theme changes at runtime\n- Letting users choose a preferred theme (light, dark, or system default)\n- Combining OS-driven theme response with custom color palettes\n\n## When Not to Use\n\n- Localization or language switching — see [.NET MAUI localization docs](https:\u002F\u002Flearn.microsoft.com\u002Fdotnet\u002Fmaui\u002Ffundamentals\u002Flocalization)\n- Accessibility-specific visual adjustments — see [.NET MAUI accessibility docs](https:\u002F\u002Flearn.microsoft.com\u002Fdotnet\u002Fmaui\u002Ffundamentals\u002Faccessibility)\n- App icon or splash screen configuration — see [.NET MAUI app icon docs](https:\u002F\u002Flearn.microsoft.com\u002Fdotnet\u002Fmaui\u002Fuser-interface\u002Fimages\u002Fapp-icons)\n- Bootstrap-style class theming — see the `Plugin.Maui.BootstrapTheme` NuGet package\n\n## Inputs\n\n- A .NET MAUI project targeting .NET 8 or later\n- XAML pages or C# UI code that need theme-aware styling\n\n## Workflow\n\n1. Detect the current theme approach in the project (AppThemeBinding, ResourceDictionary, or none).\n2. Choose the appropriate strategy: AppThemeBinding for simple light\u002Fdark, ResourceDictionary swap for custom\u002Fmultiple themes, or both combined.\n3. Define theme resources — inline `AppThemeBinding` values or separate `ResourceDictionary` files with matching keys.\n4. Replace hardcoded colors with `DynamicResource` bindings (or `AppThemeBinding` markup) throughout XAML pages.\n5. Add system theme detection via `Application.Current.RequestedTheme` and the `RequestedThemeChanged` event.\n6. Implement user preference persistence with `Preferences.Set` \u002F `Preferences.Get` and apply on startup.\n7. Verify Android `ConfigChanges.UiMode` is set on `MainActivity` to avoid activity restarts on theme change.\n8. Test both light and dark themes on at least one target platform, confirming all UI elements respond correctly.\n\n## Rules That Change the Answer\n\nCheck these rules against the user's scenario, and apply **only** the ones that\naffect what they asked. `UiMode` and dictionary swapping matter for *runtime theme\nswitching*; they are noise in a question about setting up `AppThemeBinding`.\n\n**Answer narrowly, but completely.** Completeness means showing the code that\nimplements *what you recommended* — not adding adjacent topics. If you recommend\n`DynamicResource`, show the dictionary swap that makes it update. If the user asks\nfor light\u002Fdark colours in C#, show **both** `SetAppThemeColor` (colours) and the\ngeneric `SetAppTheme\u003CT>` (any bindable property type), and prefer resource keys over\nscattered hardcoded colours. Do not tack on platform configuration the question\ndidn't raise.\n\n| Rule | Do this | Not this | Why |\n|---|---|---|---|\n| **Runtime-swapped values must be dynamic** | `{DynamicResource Key}` | `{StaticResource Key}` | `StaticResource` resolves once at load and never updates when dictionaries are swapped. |\n| **Android must declare `UiMode`** *(only for runtime\u002Fsystem theme switching)* | Include `ConfigChanges.UiMode` in the `ConfigurationChanges` list on `MainActivity` | Omitting it | Without it Android restarts the activity on theme change — navigation state is lost and it looks like a crash. Irrelevant to a static `AppThemeBinding` setup |\n| **Force a theme via `UserAppTheme`** | `Application.Current.UserAppTheme = AppTheme.Dark` | Manually re-assigning colors | `UserAppTheme` overrides the OS; `AppTheme.Unspecified` returns to following the system. |\n\n**Do not** replace a working `AppThemeBinding` setup with ResourceDictionary\nswapping (or vice versa) unless the user needs what the other approach provides —\nmore than two themes, or a user-selectable theme.\n\n## Choosing an Approach\n\n| Approach | Best for | Limitation |\n|----------|----------|------------|\n| **AppThemeBinding** | Automatic light\u002Fdark with OS — minimal code | Only two themes (light + dark) |\n| **ResourceDictionary swap** | Custom branded themes, more than two themes, user preference | More setup; must use `DynamicResource` everywhere |\n| **Both combined** | OS-driven response plus custom theme colors | Most flexible but most complex |\n\n## AppThemeBinding (OS Light\u002FDark)\n\n`AppThemeBinding` selects a value based on the current system theme. It supports `Light`, `Dark`, and an optional `Default` fallback.\n\n### Define the palette once — don't scatter literals\n\nPutting `{AppThemeBinding Light=#333333, Dark=#FFFFFF}` on every element is the\nsingle most common theming mistake: the palette ends up duplicated across dozens of\nfiles and cannot be changed in one place. **Recommend this shape as the final\nanswer**, not inline literals:\n\n```xml\n\u003C!-- App.xaml — one source of truth for the whole app -->\n\u003CApplication.Resources>\n    \u003CResourceDictionary>\n\n        \u003C!-- 1. Raw palette -->\n        \u003CColor x:Key=\"LightPageBackground\">#FFFFFF\u003C\u002FColor>\n        \u003CColor x:Key=\"DarkPageBackground\">#1E1E1E\u003C\u002FColor>\n        \u003CColor x:Key=\"LightPrimaryText\">#333333\u003C\u002FColor>\n        \u003CColor x:Key=\"DarkPrimaryText\">#E0E0E0\u003C\u002FColor>\n\n        \u003C!-- 2. Implicit styles bind the pair once; every page inherits them -->\n        \u003CStyle TargetType=\"ContentPage\" ApplyToDerivedTypes=\"True\">\n            \u003CSetter Property=\"BackgroundColor\"\n                    Value=\"{AppThemeBinding Light={StaticResource LightPageBackground},\n                                            Dark={StaticResource DarkPageBackground}}\" \u002F>\n        \u003C\u002FStyle>\n\n        \u003CStyle TargetType=\"Label\">\n            \u003CSetter Property=\"TextColor\"\n                    Value=\"{AppThemeBinding Light={StaticResource LightPrimaryText},\n                                            Dark={StaticResource DarkPrimaryText}}\" \u002F>\n        \u003C\u002FStyle>\n\n    \u003C\u002FResourceDictionary>\n\u003C\u002FApplication.Resources>\n```\n\nPages then need **no theming markup at all** — they pick the styles up implicitly.\nUse an inline `AppThemeBinding` only for genuine one-offs, and even then reference\n`{StaticResource}` keys rather than literal hex.\n\n### XAML (inline form, for one-offs)\n\n```xml\n\u003CLabel Text=\"Themed text\"\n       TextColor=\"{AppThemeBinding Light=Green, Dark=Red}\"\n       BackgroundColor=\"{AppThemeBinding Light=White, Dark=Black}\" \u002F>\n\n\u003C!-- With resource references — preferred over literals -->\n\u003CLabel TextColor=\"{AppThemeBinding Light={StaticResource LightPrimary},\n                                   Dark={StaticResource DarkPrimary}}\" \u002F>\n```\n\n### C# Extension Methods\n\nShow **both** when answering a \"light\u002Fdark colours in C#\" question — `SetAppThemeColor`\ncovers `Color` properties, `SetAppTheme\u003CT>` covers everything else:\n\n```csharp\nvar label = new Label();\n\n\u002F\u002F Color-specific helper\nlabel.SetAppThemeColor(Label.TextColorProperty, Colors.Green, Colors.Red);\n\n\u002F\u002F Generic helper — works for any bindable property type, not just Color\nlabel.SetAppTheme\u003CColor>(Label.TextColorProperty, Colors.Green, Colors.Red);\nlabel.SetAppTheme\u003Cdouble>(Label.FontSizeProperty, 14, 16);\n\n\u002F\u002F The BindableProperty must belong to the object you call it on —\n\u002F\u002F Image.SourceProperty goes on an Image, not a Label.\nvar image = new Image();\nimage.SetAppTheme\u003CImageSource>(Image.SourceProperty,\n    ImageSource.FromFile(\"logo_light.png\"),\n    ImageSource.FromFile(\"logo_dark.png\"));\n```\n\nPrefer defining the values as resource keys and referencing them, rather than\nscattering hardcoded colours across the codebase.\n\n## ResourceDictionary Theming (Custom Themes)\n\nUse separate `ResourceDictionary` files with matching keys to define themes, then swap them at runtime.\n\n### Step 1 — Define Theme Dictionaries\n\nWhen using compiled XAML with `x:Class` (as shown below), each dictionary needs a code-behind that calls `InitializeComponent()`. Dictionaries loaded via `Source` without `x:Class` do not need code-behind.\n\n**LightTheme.xaml**\n\n```xml\n\u003CResourceDictionary xmlns=\"http:\u002F\u002Fschemas.microsoft.com\u002Fdotnet\u002F2021\u002Fmaui\"\n                    xmlns:x=\"http:\u002F\u002Fschemas.microsoft.com\u002Fwinfx\u002F2009\u002Fxaml\"\n                    x:Class=\"MyApp.Themes.LightTheme\">\n    \u003CColor x:Key=\"PageBackgroundColor\">White\u003C\u002FColor>\n    \u003CColor x:Key=\"PrimaryTextColor\">#333333\u003C\u002FColor>\n    \u003CColor x:Key=\"AccentColor\">#2196F3\u003C\u002FColor>\n\u003C\u002FResourceDictionary>\n```\n\n**LightTheme.xaml.cs**\n\n```csharp\nnamespace MyApp.Themes;\n\npublic partial class LightTheme : ResourceDictionary\n{\n    public LightTheme() => InitializeComponent();\n}\n```\n\nCreate a matching **DarkTheme.xaml \u002F DarkTheme.xaml.cs** with the same keys and different values.\n\n### Step 2 — Consume with DynamicResource\n\nUse `DynamicResource` so values update when the dictionary is swapped at runtime:\n\n```xml\n\u003CContentPage BackgroundColor=\"{DynamicResource PageBackgroundColor}\">\n    \u003CLabel Text=\"Hello\"\n           TextColor=\"{DynamicResource PrimaryTextColor}\" \u002F>\n    \u003CButton Text=\"Action\"\n            BackgroundColor=\"{DynamicResource AccentColor}\" \u002F>\n\u003C\u002FContentPage>\n```\n\n### Step 3 — Switch Themes at Runtime\n\n> ? **Never call `MergedDictionaries.Clear()` to swap a theme.** The default MAUI\n> template merges `Resources\u002FStyles\u002FColors.xaml` and `Styles.xaml` into\n> `Application.Resources`. `Clear()` removes **those too**, so every implicit style,\n> brush and colour in the app silently disappears — buttons, entries and labels all\n> revert to unstyled defaults. Verified: after `Clear()`, `MergedDictionaries` drops\n> from 2 to 1 and the template's `Primary` colour no longer resolves.\n\nRemove only the theme you added, and leave everything else alone:\n\n```csharp\nstatic ResourceDictionary? _currentTheme;\n\nvoid ApplyTheme(ResourceDictionary theme)\n{\n    var merged = Application.Current!.Resources.MergedDictionaries;\n\n    \u002F\u002F ✅ Remove ONLY the previous theme — Colors.xaml \u002F Styles.xaml survive\n    if (_currentTheme is not null)\n        merged.Remove(_currentTheme);\n\n    merged.Add(theme);\n    _currentTheme = theme;\n}\n\n\u002F\u002F Usage\nApplyTheme(new DarkTheme());\n```\n\n```csharp\n\u002F\u002F ❌ Destroys the app's Colors.xaml and Styles.xaml along with the old theme\nvar merged = Application.Current!.Resources.MergedDictionaries;\nmerged.Clear();\nmerged.Add(theme);\n```\n\n## System Theme Detection\n\n### Read the Current Theme\n\n```csharp\nAppTheme currentTheme = Application.Current!.RequestedTheme;\n\u002F\u002F Returns AppTheme.Light, AppTheme.Dark, or AppTheme.Unspecified\n```\n\n### Override the System Theme\n\n```csharp\n\u002F\u002F Force dark mode regardless of OS setting\nApplication.Current!.UserAppTheme = AppTheme.Dark;\n\n\u002F\u002F Reset to follow system theme\nApplication.Current!.UserAppTheme = AppTheme.Unspecified;\n```\n\n### React to Theme Changes\n\n```csharp\nApplication.Current!.RequestedThemeChanged += (s, e) =>\n{\n    AppTheme newTheme = e.RequestedTheme;\n    \u002F\u002F Update UI or switch ResourceDictionaries\n};\n```\n\n## Combining Both Approaches\n\nUse `AppThemeBinding` with `DynamicResource` values for maximum flexibility — the\nnested `DynamicResource` stays live, so swapping the dictionary updates the value\n*and* the OS light\u002Fdark switch is still honoured:\n\n```xml\n\u003CLabel TextColor=\"{AppThemeBinding\n    Light={DynamicResource LightPrimary},\n    Dark={DynamicResource DarkPrimary}}\" \u002F>\n```\n\nOr react to system changes and swap full dictionaries:\n\n```csharp\nApplication.Current!.RequestedThemeChanged += (s, e) =>\n{\n    ApplyTheme(e.RequestedTheme == AppTheme.Dark\n        ? new DarkTheme()\n        : new LightTheme());\n};\n```\n\n## Saving and Restoring User Preference\n\nStore the user's choice with `Preferences` and apply it on startup:\n\n```csharp\n\u002F\u002F Save choice\nPreferences.Set(\"AppTheme\", \"Dark\");\n\n\u002F\u002F Restore on startup (in App constructor or CreateWindow)\nvar saved = Preferences.Get(\"AppTheme\", \"System\");\nApplication.Current!.UserAppTheme = saved switch\n{\n    \"Light\" => AppTheme.Light,\n    \"Dark\"  => AppTheme.Dark,\n    _       => AppTheme.Unspecified\n};\n```\n\n## Common Pitfalls\n\n### Android: ConfigChanges.UiMode is Required\n\n`MainActivity` **must** include `ConfigChanges.UiMode` or theme-change events will not fire and the activity restarts instead of handling the change gracefully:\n\n```csharp\n[Activity(Theme = \"@style\u002FMaui.SplashTheme\",\n          MainLauncher = true,\n          ConfigurationChanges = ConfigChanges.ScreenSize\n                               | ConfigChanges.Orientation\n                               | ConfigChanges.UiMode  \u002F\u002F ← Required for theme detection\n                               | ConfigChanges.ScreenLayout\n                               | ConfigChanges.SmallestScreenSize\n                               | ConfigChanges.Density)]\npublic class MainActivity : MauiAppCompatActivity { }\n```\n\nWithout `UiMode`, toggling dark mode in Android settings causes a full activity restart — losing navigation state and appearing as a crash. With it declared, the app stays alive and `RequestedThemeChanged` fires, so pair this fix with a handler that re-applies the theme (see below).\n\n### DynamicResource vs StaticResource\n\nWhen using ResourceDictionary theme switching, you **must** use `DynamicResource`:\n\n```xml\n\u003C!-- ✅ Updates when theme dictionary changes -->\n\u003CLabel TextColor=\"{DynamicResource PrimaryTextColor}\" \u002F>\n\n\u003C!-- ❌ Frozen at first load — won't update on theme switch -->\n\u003CLabel TextColor=\"{StaticResource PrimaryTextColor}\" \u002F>\n```\n\n`DynamicResource` only helps if something actually swaps the dictionary. When you\ndiagnose this, always show the swap and the system-theme hook alongside the fix —\notherwise the user has a corrected binding that still never updates:\n\n```csharp\nstatic ResourceDictionary? _currentTheme;\n\nvoid ApplyTheme(bool useDark)\n{\n    var merged = Application.Current!.Resources.MergedDictionaries;\n\n    \u002F\u002F Remove only the previous theme — never Clear(), which also wipes\n    \u002F\u002F the template's Colors.xaml \u002F Styles.xaml\n    if (_currentTheme is not null)\n        merged.Remove(_currentTheme);\n\n    _currentTheme = useDark ? new DarkTheme() : new LightTheme();\n    merged.Add(_currentTheme);\n}\n\n\u002F\u002F React to the OS switching light\u002Fdark\nApplication.Current!.RequestedThemeChanged += (s, e) =>\n    ApplyTheme(e.RequestedTheme == AppTheme.Dark);\n```\n\n### Hardcoded Colors Break Theming\n\nAvoid inline color values on elements that should respect the theme:\n\n```xml\n\u003C!-- ❌ Will not change with theme -->\n\u003CLabel TextColor=\"#333333\" \u002F>\n\n\u003C!-- ✅ Theme-aware -->\n\u003CLabel TextColor=\"{DynamicResource PrimaryTextColor}\" \u002F>\n```\n\n### CSS Themes Cannot Be Swapped at Runtime\n\n.NET MAUI supports CSS styling, but CSS-based themes **cannot be swapped dynamically**. Use ResourceDictionary theming for runtime switching.\n\n### Theme Keys Must Match Across Dictionaries\n\nEvery `x:Key` used in one theme dictionary must exist in all other theme dictionaries. A missing key causes a silent fallback to the default value, leading to inconsistent appearance.\n\n## Platform Support\n\n| Platform       | Minimum Version |\n|----------------|-----------------|\n| iOS            | 13+             |\n| Android        | 10+ (API 29)    |\n| macOS Catalyst | 10.15+          |\n| Windows        | 10+             |\n\n## Quick Reference\n\n- **OS light\u002Fdark** → `AppThemeBinding` markup extension\n- **Theme colors in C#** → `SetAppThemeColor()`, `SetAppTheme\u003CT>()`\n- **Read OS theme** → `Application.Current.RequestedTheme`\n- **Force theme** → `Application.Current.UserAppTheme = AppTheme.Dark`\n- **Theme changes** → `RequestedThemeChanged` event\n- **Custom switching** → `Remove` the old theme from `MergedDictionaries`, then `Add` the new one — **never `Clear()`**\n- **Runtime bindings** → **`DynamicResource`** (not `StaticResource`)\n- **Persist choice** → `Preferences.Set` \u002F `Preferences.Get`\n","# .NET MAUI Theming\n\nApply light\u002Fdark mode support, custom branded themes, and runtime theme switching in .NET MAUI apps using AppThemeBinding, ResourceDictionary swapping, and system theme detection APIs.\n\n## When to Use\n\n- Adding light and dark mode support to a .NET MAUI app\n- Creating custom branded themes with ResourceDictionary\n- Detecting and responding to system theme changes at runtime\n- Letting users choose a preferred theme (light, dark, or system default)\n- Combining OS-driven theme response with custom color palettes\n\n## When Not to Use\n\n- Localization or language switching — see [.NET MAUI localization docs](https:\u002F\u002Flearn.microsoft.com\u002Fdotnet\u002Fmaui\u002Ffundamentals\u002Flocalization)\n- Accessibility-specific visual adjustments — see [.NET MAUI accessibility docs](https:\u002F\u002Flearn.microsoft.com\u002Fdotnet\u002Fmaui\u002Ffundamentals\u002Faccessibility)\n- App icon or splash screen configuration — see [.NET MAUI app icon docs](https:\u002F\u002Flearn.microsoft.com\u002Fdotnet\u002Fmaui\u002Fuser-interface\u002Fimages\u002Fapp-icons)\n- Bootstrap-style class theming — see the `Plugin.Maui.BootstrapTheme` NuGet package\n\n## Inputs\n\n- A .NET MAUI project targeting .NET 8 or later\n- XAML pages or C# UI code that need theme-aware styling\n\n## Workflow\n\n1. Detect the current theme approach in the project (AppThemeBinding, ResourceDictionary, or none).\n2. Choose the appropriate strategy: AppThemeBinding for simple light\u002Fdark, ResourceDictionary swap for custom\u002Fmultiple themes, or both combined.\n3. Define theme resources — inline `AppThemeBinding` values or separate `ResourceDictionary` files with matching keys.\n4. Replace hardcoded colors with `DynamicResource` bindings (or `AppThemeBinding` markup) throughout XAML pages.\n5. Add system theme detection via `Application.Current.RequestedTheme` and the `RequestedThemeChanged` event.\n6. Implement user preference persistence with `Preferences.Set` \u002F `Preferences.Get` and apply on startup.\n7. Verify Android `ConfigChanges.UiMode` is set on `MainActivity` to avoid activity restarts on theme change.\n8. Test both light and dark themes on at least one target platform, confirming all UI elements respond correctly.\n\n## Rules That Change the Answer\n\nCheck these rules against the user's scenario, and apply **only** the ones that\naffect what they asked. `UiMode` and dictionary swapping matter for *runtime theme\nswitching*; they are noise in a question about setting up `AppThemeBinding`.\n\n**Answer narrowly, but completely.** Completeness means showing the code that\nimplements *what you recommended* — not adding adjacent topics. If you recommend\n`DynamicResource`, show the dictionary swap that makes it update. If the user asks\nfor light\u002Fdark colours in C#, show **both** `SetAppThemeColor` (colours) and the\ngeneric `SetAppTheme\u003CT>` (any bindable property type), and prefer resource keys over\nscattered hardcoded colours. Do not tack on platform configuration the question\ndidn't raise.\n\n| Rule | Do this | Not this | Why |\n|---|---|---|---|\n| **Runtime-swapped values must be dynamic** | `{DynamicResource Key}` | `{StaticResource Key}` | `StaticResource` resolves once at load and never updates when dictionaries are swapped. |\n| **Android must declare `UiMode`** *(only for runtime\u002Fsystem theme switching)* | Include `ConfigChanges.UiMode` in the `ConfigurationChanges` list on `MainActivity` | Omitting it | Without it Android restarts the activity on theme change — navigation state is lost and it looks like a crash. Irrelevant to a static `AppThemeBinding` setup |\n| **Force a theme via `UserAppTheme`** | `Application.Current.UserAppTheme = AppTheme.Dark` | Manually re-assigning colors | `UserAppTheme` overrides the OS; `AppTheme.Unspecified` returns to following the system. |\n\n**Do not** replace a working `AppThemeBinding` setup with ResourceDictionary\nswapping (or vice versa) unless the user needs what the other approach provides —\nmore than two themes, or a user-selectable theme.\n\n## Choosing an Approach\n\n| Approach | Best for | Limitation |\n|----------|----------|------------|\n| **AppThemeBinding** | Automatic light\u002Fdark with OS — minimal code | Only two themes (light + dark) |\n| **ResourceDictionary swap** | Custom branded themes, more than two themes, user preference | More setup; must use `DynamicResource` everywhere |\n| **Both combined** | OS-driven response plus custom theme colors | Most flexible but most complex |\n\n## AppThemeBinding (OS Light\u002FDark)\n\n`AppThemeBinding` selects a value based on the current system theme. It supports `Light`, `Dark`, and an optional `Default` fallback.\n\n### Define the palette once — don't scatter literals\n\nPutting `{AppThemeBinding Light=#333333, Dark=#FFFFFF}` on every element is the\nsingle most common theming mistake: the palette ends up duplicated across dozens of\nfiles and cannot be changed in one place. **Recommend this shape as the final\nanswer**, not inline literals:\n\n```xml\n\u003C!-- App.xaml — one source of truth for the whole app -->\n\u003CApplication.Resources>\n    \u003CResourceDictionary>\n\n        \u003C!-- 1. Raw palette -->\n        \u003CColor x:Key=\"LightPageBackground\">#FFFFFF\u003C\u002FColor>\n        \u003CColor x:Key=\"DarkPageBackground\">#1E1E1E\u003C\u002FColor>\n        \u003CColor x:Key=\"LightPrimaryText\">#333333\u003C\u002FColor>\n        \u003CColor x:Key=\"DarkPrimaryText\">#E0E0E0\u003C\u002FColor>\n\n        \u003C!-- 2. Implicit styles bind the pair once; every page inherits them -->\n        \u003CStyle TargetType=\"ContentPage\" ApplyToDerivedTypes=\"True\">\n            \u003CSetter Property=\"BackgroundColor\"\n                    Value=\"{AppThemeBinding Light={StaticResource LightPageBackground},\n                                            Dark={StaticResource DarkPageBackground}}\" \u002F>\n        \u003C\u002FStyle>\n\n        \u003CStyle TargetType=\"Label\">\n            \u003CSetter Property=\"TextColor\"\n                    Value=\"{AppThemeBinding Light={StaticResource LightPrimaryText},\n                                            Dark={StaticResource DarkPrimaryText}}\" \u002F>\n        \u003C\u002FStyle>\n\n    \u003C\u002FResourceDictionary>\n\u003C\u002FApplication.Resources>\n```\n\nPages then need **no theming markup at all** — they pick the styles up implicitly.\nUse an inline `AppThemeBinding` only for genuine one-offs, and even then reference\n`{StaticResource}` keys rather than literal hex.\n\n### XAML (inline form, for one-offs)\n\n```xml\n\u003CLabel Text=\"Themed text\"\n       TextColor=\"{AppThemeBinding Light=Green, Dark=Red}\"\n       BackgroundColor=\"{AppThemeBinding Light=White, Dark=Black}\" \u002F>\n\n\u003C!-- With resource references — preferred over literals -->\n\u003CLabel TextColor=\"{AppThemeBinding Light={StaticResource LightPrimary},\n                                   Dark={StaticResource DarkPrimary}}\" \u002F>\n```\n\n### C# Extension Methods\n\nShow **both** when answering a \"light\u002Fdark colours in C#\" question — `SetAppThemeColor`\ncovers `Color` properties, `SetAppTheme\u003CT>` covers everything else:\n\n```csharp\nvar label = new Label();\n\n\u002F\u002F Color-specific helper\nlabel.SetAppThemeColor(Label.TextColorProperty, Colors.Green, Colors.Red);\n\n\u002F\u002F Generic helper — works for any bindable property type, not just Color\nlabel.SetAppTheme\u003CColor>(Label.TextColorProperty, Colors.Green, Colors.Red);\nlabel.SetAppTheme\u003Cdouble>(Label.FontSizeProperty, 14, 16);\n\n\u002F\u002F The BindableProperty must belong to the object you call it on —\n\u002F\u002F Image.SourceProperty goes on an Image, not a Label.\nvar image = new Image();\nimage.SetAppTheme\u003CImageSource>(Image.SourceProperty,\n    ImageSource.FromFile(\"logo_light.png\"),\n    ImageSource.FromFile(\"logo_dark.png\"));\n```\n\nPrefer defining the values as resource keys and referencing them, rather than\nscattering hardcoded colours across the codebase.\n\n## ResourceDictionary Theming (Custom Themes)\n\nUse separate `ResourceDictionary` files with matching keys to define themes, then swap them at runtime.\n\n### Step 1 — Define Theme Dictionaries\n\nWhen using compiled XAML with `x:Class` (as shown below), each dictionary needs a code-behind that calls `InitializeComponent()`. Dictionaries loaded via `Source` without `x:Class` do not need code-behind.\n\n**LightTheme.xaml**\n\n```xml\n\u003CResourceDictionary xmlns=\"http:\u002F\u002Fschemas.microsoft.com\u002Fdotnet\u002F2021\u002Fmaui\"\n                    xmlns:x=\"http:\u002F\u002Fschemas.microsoft.com\u002Fwinfx\u002F2009\u002Fxaml\"\n                    x:Class=\"MyApp.Themes.LightTheme\">\n    \u003CColor x:Key=\"PageBackgroundColor\">White\u003C\u002FColor>\n    \u003CColor x:Key=\"PrimaryTextColor\">#333333\u003C\u002FColor>\n    \u003CColor x:Key=\"AccentColor\">#2196F3\u003C\u002FColor>\n\u003C\u002FResourceDictionary>\n```\n\n**LightTheme.xaml.cs**\n\n```csharp\nnamespace MyApp.Themes;\n\npublic partial class LightTheme : ResourceDictionary\n{\n    public LightTheme() => InitializeComponent();\n}\n```\n\nCreate a matching **DarkTheme.xaml \u002F DarkTheme.xaml.cs** with the same keys and different values.\n\n### Step 2 — Consume with DynamicResource\n\nUse `DynamicResource` so values update when the dictionary is swapped at runtime:\n\n```xml\n\u003CContentPage BackgroundColor=\"{DynamicResource PageBackgroundColor}\">\n    \u003CLabel Text=\"Hello\"\n           TextColor=\"{DynamicResource PrimaryTextColor}\" \u002F>\n    \u003CButton Text=\"Action\"\n            BackgroundColor=\"{DynamicResource AccentColor}\" \u002F>\n\u003C\u002FContentPage>\n```\n\n### Step 3 — Switch Themes at Runtime\n\n> ? **Never call `MergedDictionaries.Clear()` to swap a theme.** The default MAUI\n> template merges `Resources\u002FStyles\u002FColors.xaml` and `Styles.xaml` into\n> `Application.Resources`. `Clear()` removes **those too**, so every implicit style,\n> brush and colour in the app silently disappears — buttons, entries and labels all\n> revert to unstyled defaults. Verified: after `Clear()`, `MergedDictionaries` drops\n> from 2 to 1 and the template's `Primary` colour no longer resolves.\n\nRemove only the theme you added, and leave everything else alone:\n\n```csharp\nstatic ResourceDictionary? _currentTheme;\n\nvoid ApplyTheme(ResourceDictionary theme)\n{\n    var merged = Application.Current!.Resources.MergedDictionaries;\n\n    \u002F\u002F ✅ Remove ONLY the previous theme — Colors.xaml \u002F Styles.xaml survive\n    if (_currentTheme is not null)\n        merged.Remove(_currentTheme);\n\n    merged.Add(theme);\n    _currentTheme = theme;\n}\n\n\u002F\u002F Usage\nApplyTheme(new DarkTheme());\n```\n\n```csharp\n\u002F\u002F ❌ Destroys the app's Colors.xaml and Styles.xaml along with the old theme\nvar merged = Application.Current!.Resources.MergedDictionaries;\nmerged.Clear();\nmerged.Add(theme);\n```\n\n## System Theme Detection\n\n### Read the Current Theme\n\n```csharp\nAppTheme currentTheme = Application.Current!.RequestedTheme;\n\u002F\u002F Returns AppTheme.Light, AppTheme.Dark, or AppTheme.Unspecified\n```\n\n### Override the System Theme\n\n```csharp\n\u002F\u002F Force dark mode regardless of OS setting\nApplication.Current!.UserAppTheme = AppTheme.Dark;\n\n\u002F\u002F Reset to follow system theme\nApplication.Current!.UserAppTheme = AppTheme.Unspecified;\n```\n\n### React to Theme Changes\n\n```csharp\nApplication.Current!.RequestedThemeChanged += (s, e) =>\n{\n    AppTheme newTheme = e.RequestedTheme;\n    \u002F\u002F Update UI or switch ResourceDictionaries\n};\n```\n\n## Combining Both Approaches\n\nUse `AppThemeBinding` with `DynamicResource` values for maximum flexibility — the\nnested `DynamicResource` stays live, so swapping the dictionary updates the value\n*and* the OS light\u002Fdark switch is still honoured:\n\n```xml\n\u003CLabel TextColor=\"{AppThemeBinding\n    Light={DynamicResource LightPrimary},\n    Dark={DynamicResource DarkPrimary}}\" \u002F>\n```\n\nOr react to system changes and swap full dictionaries:\n\n```csharp\nApplication.Current!.RequestedThemeChanged += (s, e) =>\n{\n    ApplyTheme(e.RequestedTheme == AppTheme.Dark\n        ? new DarkTheme()\n        : new LightTheme());\n};\n```\n\n## Saving and Restoring User Preference\n\nStore the user's choice with `Preferences` and apply it on startup:\n\n```csharp\n\u002F\u002F Save choice\nPreferences.Set(\"AppTheme\", \"Dark\");\n\n\u002F\u002F Restore on startup (in App constructor or CreateWindow)\nvar saved = Preferences.Get(\"AppTheme\", \"System\");\nApplication.Current!.UserAppTheme = saved switch\n{\n    \"Light\" => AppTheme.Light,\n    \"Dark\"  => AppTheme.Dark,\n    _       => AppTheme.Unspecified\n};\n```\n\n## Common Pitfalls\n\n### Android: ConfigChanges.UiMode is Required\n\n`MainActivity` **must** include `ConfigChanges.UiMode` or theme-change events will not fire and the activity restarts instead of handling the change gracefully:\n\n```csharp\n[Activity(Theme = \"@style\u002FMaui.SplashTheme\",\n          MainLauncher = true,\n          ConfigurationChanges = ConfigChanges.ScreenSize\n                               | ConfigChanges.Orientation\n                               | ConfigChanges.UiMode  \u002F\u002F ← Required for theme detection\n                               | ConfigChanges.ScreenLayout\n                               | ConfigChanges.SmallestScreenSize\n                               | ConfigChanges.Density)]\npublic class MainActivity : MauiAppCompatActivity { }\n```\n\nWithout `UiMode`, toggling dark mode in Android settings causes a full activity restart — losing navigation state and appearing as a crash. With it declared, the app stays alive and `RequestedThemeChanged` fires, so pair this fix with a handler that re-applies the theme (see below).\n\n### DynamicResource vs StaticResource\n\nWhen using ResourceDictionary theme switching, you **must** use `DynamicResource`:\n\n```xml\n\u003C!-- ✅ Updates when theme dictionary changes -->\n\u003CLabel TextColor=\"{DynamicResource PrimaryTextColor}\" \u002F>\n\n\u003C!-- ❌ Frozen at first load — won't update on theme switch -->\n\u003CLabel TextColor=\"{StaticResource PrimaryTextColor}\" \u002F>\n```\n\n`DynamicResource` only helps if something actually swaps the dictionary. When you\ndiagnose this, always show the swap and the system-theme hook alongside the fix —\notherwise the user has a corrected binding that still never updates:\n\n```csharp\nstatic ResourceDictionary? _currentTheme;\n\nvoid ApplyTheme(bool useDark)\n{\n    var merged = Application.Current!.Resources.MergedDictionaries;\n\n    \u002F\u002F Remove only the previous theme — never Clear(), which also wipes\n    \u002F\u002F the template's Colors.xaml \u002F Styles.xaml\n    if (_currentTheme is not null)\n        merged.Remove(_currentTheme);\n\n    _currentTheme = useDark ? new DarkTheme() : new LightTheme();\n    merged.Add(_currentTheme);\n}\n\n\u002F\u002F React to the OS switching light\u002Fdark\nApplication.Current!.RequestedThemeChanged += (s, e) =>\n    ApplyTheme(e.RequestedTheme == AppTheme.Dark);\n```\n\n### Hardcoded Colors Break Theming\n\nAvoid inline color values on elements that should respect the theme:\n\n```xml\n\u003C!-- ❌ Will not change with theme -->\n\u003CLabel TextColor=\"#333333\" \u002F>\n\n\u003C!-- ✅ Theme-aware -->\n\u003CLabel TextColor=\"{DynamicResource PrimaryTextColor}\" \u002F>\n```\n\n### CSS Themes Cannot Be Swapped at Runtime\n\n.NET MAUI supports CSS styling, but CSS-based themes **cannot be swapped dynamically**. Use ResourceDictionary theming for runtime switching.\n\n### Theme Keys Must Match Across Dictionaries\n\nEvery `x:Key` used in one theme dictionary must exist in all other theme dictionaries. A missing key causes a silent fallback to the default value, leading to inconsistent appearance.\n\n## Platform Support\n\n| Platform       | Minimum Version |\n|----------------|-----------------|\n| iOS            | 13+             |\n| Android        | 10+ (API 29)    |\n| macOS Catalyst | 10.15+          |\n| Windows        | 10+             |\n\n## Quick Reference\n\n- **OS light\u002Fdark** → `AppThemeBinding` markup extension\n- **Theme colors in C#** → `SetAppThemeColor()`, `SetAppTheme\u003CT>()`\n- **Read OS theme** → `Application.Current.RequestedTheme`\n- **Force theme** → `Application.Current.UserAppTheme = AppTheme.Dark`\n- **Theme changes** → `RequestedThemeChanged` event\n- **Custom switching** → `Remove` the old theme from `MergedDictionaries`, then `Add` the new one — **never `Clear()`**\n- **Runtime bindings** → **`DynamicResource`** (not `StaticResource`)\n- **Persist choice** → `Preferences.Set` \u002F `Preferences.Get`\n",{"name":5,"license":15,"description":7},"main","497cc9aba79a931ac6fb8d36a48cc22fe3d6d74b","external-sources\u002Fupstreams\u002Fdotnet-skills\u002Fplugins\u002Fdotnet-maui\u002Fskills\u002Fmaui-theming",41,"https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills","https:\u002F\u002Fskills.managed-code.com","https:\u002F\u002Fgithub.com\u002Fmanagedcode","https:\u002F\u002Fwww.managed-code.com","Open Source Community for .NET Developers: Reliable, Actively Maintained, and Community-Driven. Made in Ukraine 🇺🇦 with ❤️","2026-11-11 19:34:28",{"source":8,"skillName":5,"commands":63,"prompt":73,"zipAvailable":74},[64,67,70],{"tool":65,"command":66},"npx","npx skills add managedcode\u002Fdotnet-skills --skill maui-theming",{"tool":68,"command":69},"bunx","bunx skills add managedcode\u002Fdotnet-skills --skill maui-theming",{"tool":71,"command":72},"pnpm","pnpm dlx skills add managedcode\u002Fdotnet-skills --skill maui-theming","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fexternal-sources\u002Fupstreams\u002Fdotnet-skills\u002Fplugins\u002Fdotnet-maui\u002Fskills\u002Fmaui-theming\u002FSKILL.md",true,[76,82],{"path":77,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":80,"sourceHtmlUrl":81},"references\u002FGUIDE.md","REFERENCE","参考文档",153,"https:\u002F\u002Fgithub.com\u002Falex-feel\u002Fhugo-artifacts\u002Fblob\u002Fmain\u002Fmodules\u002Fagent-readiness\u002Ftest\u002Ffixture-origin\u002Ffixture-unverifiable\u002Freferences\u002FGUIDE.md",{"path":83,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":84,"sourceHtmlUrl":85},"references\u002Ftheming-api.md",4344,"https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fexternal-sources\u002Fupstreams\u002Fdotnet-skills\u002Fplugins\u002Fdotnet-maui\u002Fskills\u002Fmaui-theming\u002Freferences\u002Ftheming-api.md",[87,124,148,176,186,212],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":103,"publishedAt":47},"01M6DYQE1Y9FHAQHEDTVFQ3447","xtwitter-scraper","Use XTwitterScraper when a .NET application needs typed access to Xquik's X automation REST API for tweet search, user lookup, posting workflows, extraction jobs, monitors, webhooks, or giveaway draws. USE FOR: integrating the XTwitterScraper NuGet package; reviewing Xquik API client usage; modeling API-key configuration, pagination, binary exports, raw responses, retries, and webhook\u002Fevent flows in .NET. DO NOT USE FOR: unrelated stacks; direct browser automation; generic social-media strategy; or code that does not call Xquik. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test, lint, or validation commands when changes are made.","https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fcatalog\u002FLibraries\u002FXTwitterScraper\u002Fskills\u002Fxtwitter-scraper\u002FSKILL.md",[93,98],{"categoryNo":94,"categoryName":95,"taxonomyType":96,"taxonomyTypeDesc":97},"01JBSEEDCAT000000000000010","后端与接口","SCENARIO","使用场景",{"categoryNo":99,"categoryName":100,"taxonomyType":101,"taxonomyTypeDesc":102},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123],"xtwitter scraper","browser automation","workflows","run","code","browser","search","repository","api","Media","api client","access","edit","unrelated","webhooks","files","social","commands","modeling","webhook",{"skillNo":125,"name":126,"nameZh":6,"description":127,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":128,"categories":129,"keywords":136,"publishedAt":47},"01M6DYQ9S4PE1H6G8MCH9T21HR","sep","Use Sep for high-performance separated-value parsing and writing in .NET, including delimiter inference, explicit parser\u002Fwriter options, and low-allocation row\u002Fcolumn workflows. USE FOR: delimited data needs are performance-sensitive and allocation-aware; project needs explicit control over separator inference, escaping, trimming, and header behavior;. DO NOT USE FOR: unrelated stacks; generic tasks that do not need this specific guidance. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test, lint, or validation commands when changes are made.","https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fcatalog\u002FLibraries\u002FSep\u002Fskills\u002Fsep\u002FSKILL.md",[130,133],{"categoryNo":131,"categoryName":132,"taxonomyType":96,"taxonomyTypeDesc":97},"01JBSEEDCAT000000000000018","写作与文案",{"categoryNo":134,"categoryName":135,"taxonomyType":101,"taxonomyTypeDesc":102},"01JBSEEDCAT000000000000036","内容创作者",[126,137,138,106,139,107,111,140,141,142,116,143,117,119,37,144,145,146,121,147],"writing","performance","tasks","data","parsing","parser","context","writer","options","project","high-performance",{"skillNo":149,"name":150,"nameZh":6,"description":151,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":152,"categories":153,"keywords":154,"publishedAt":47},"01M6DZS2DNEPXCGGF6SSCW6G5V","webgpu-threejs-tsl","Comprehensive guide for developing WebGPU-enabled Three.js applications using TSL (Three.js Shading Language). Covers WebGPU renderer setup, TSL syntax and node materials, compute shaders, post-processing effects, and WGSL integration. Use this skill when working with Three.js WebGPU, TSL shaders, node materials, or GPU compute in Three.js.","https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fexternal-sources\u002Fupstreams\u002Fwebgpu-claude-skill\u002Fskills\u002Fwebgpu-threejs-tsl\u002FSKILL.md",[],[155,156,157,158,159,160,161,162,163,164,165,40,39,166,167,168,169,170,171,172,25,173,174,175,23],"webgpu","threejs","webgpu threejs tsl","setup","shaders","gpu","integration","applications","js","node","syntax","language","three","compute","post","processing","with","renderer","materials","wgsl","effects",{"skillNo":177,"name":178,"nameZh":6,"description":179,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":180,"categories":181,"keywords":182,"publishedAt":47},"01M6DZS0BQXW2B56A289XF1X76","roslynk","Use Roslynk for semantic inspection and edits of *.cs, *.razor and *.cshtml solution files.","https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fexternal-sources\u002Fupstreams\u002Froslynk\u002Fskills\u002Froslynk\u002FSKILL.md",[],[178,39,119,183,184,25,185],"semantic","razor","inspection",{"skillNo":187,"name":188,"nameZh":6,"description":189,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":190,"categories":191,"keywords":192,"publishedAt":47},"01M6DZRW6MEJCVW80K3S4XV60K","system-text-json-net11","Imperative guidance for the System.Text.Json APIs added in .NET 11: the built-in `JsonNamingPolicy.PascalCase` naming policy, and the strongly-typed generic `JsonSerializerOptions.GetTypeInfo` and `JsonSerializerOptions.TryGetTypeInfo` metadata accessors (generic overloads that return a typed `JsonTypeInfo`). USE ONLY when the user is targeting net11.0 or later and needs PascalCase JSON property or dictionary-key names without writing a custom naming policy, a strongly-typed generic `JsonTypeInfo` instead of the non-generic `JsonTypeInfo`, or a no-throw way to probe whether a type's serialization metadata is resolved. DO NOT USE when the target is earlier than net11.0, the requested behavior uses an established pre-net11 naming policy, or the user explicitly selected another JSON library.","https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fexternal-sources\u002Fupstreams\u002Fdotnet-skills\u002Fplugins\u002Fdotnet11\u002Fskills\u002Fsystem-text-json-net11\u002FSKILL.md",[],[41,193,194,195,137,196,197,198,199,200,201,39,202,203,204,205,37,206,207,208,209,25,210,211,23],"json","text","system text json net11","policy","metadata","library","serialization","behavior","user","only","probe","guidance","later","type","dictionary","naming","targeting","custom","generic",{"skillNo":213,"name":214,"nameZh":6,"description":215,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":216,"categories":217,"keywords":220,"publishedAt":47},"01M6DZRRJP3S662NFSG1RSPQQ7","process-api-net11","Provides guidance on the new System.Diagnostics.Process APIs introduced in .NET 11: Process.Run, Process.RunAndCaptureText, Process.StartAndForget, Process.ReadAllText\u002FBytes\u002FLines, KillOnParentExit, InheritedHandles, and StartDetached. USE FOR: starting, orchestrating, or capturing output from external processes in applications targeting net11.0 or later. DO NOT USE FOR: applications targeting .NET 10 or earlier, or basic pre-.NET 11 Process.Start usage without new APIs.","https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fexternal-sources\u002Fupstreams\u002Fdotnet-skills\u002Fplugins\u002Fdotnet11\u002Fskills\u002Fprocess-api-net11\u002FSKILL.md",[218,219],{"categoryNo":94,"categoryName":95,"taxonomyType":96,"taxonomyTypeDesc":97},{"categoryNo":99,"categoryName":100,"taxonomyType":101,"taxonomyTypeDesc":102},[112,221,222,223,107,224,162,41,39,204,205,37,225,226,227,228,209,25,229],"process","process api net11","diagnostics","start","basic","processes","output","usage","new"]