[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M756HDW10RYMKJS1QB93G1P3":3,"skill-same:01M756HDW10RYMKJS1QB93G1P3":51},{"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":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":29,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M756HDW10RYMKJS1QB93G1P3","maui-safe-area",null,".NET MAUI safe area and edge-to-edge layout guidance for .NET 10+. Covers the new SafeAreaEdges property, SafeAreaRegions enum, per-edge control, keyboard avoidance, Blazor Hybrid CSS safe areas, migration from legacy iOS-only APIs, and platform-specific behavior for Android, iOS, and Mac Catalyst. USE FOR: \"safe area\", \"edge-to-edge\", \"SafeAreaEdges\", \"SafeAreaRegions\", \"keyboard avoidance\", \"notch insets\", \"status bar overlap\", \"iOS safe area\", \"Android edge-to-edge\", \"content behind status bar\", \"UseSafeArea migration\", \"soft input keyboard\", \"IgnoreSafeArea replacement\". DO NOT USE FOR: general layout or grid design (use Grid and StackLayout), app lifecycle handling (use maui-app-lifecycle), theming or styling (use maui-theming), or Shell navigation structure.","weiflycc-cmd\u002Fskills","weiflycc-cmd","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F250846518?v=4","01M756C4PFGZJWKK04WFB9S5XF","威飛工作室","01M756C4QJJ66QDXN2RN6SXY87",0,"MIT","https:\u002F\u002Fgithub.com\u002Fweiflycc-cmd\u002Fskills\u002Fblob\u002Fmain\u002Fplugins\u002Fdotnet-maui\u002Fskills\u002Fmaui-safe-area\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: maui-safe-area\ndescription: >-\n  .NET MAUI safe area and edge-to-edge layout guidance for .NET 10+. Covers the\n  new SafeAreaEdges property, SafeAreaRegions enum, per-edge control, keyboard\n  avoidance, Blazor Hybrid CSS safe areas, migration from legacy iOS-only APIs,\n  and platform-specific behavior for Android, iOS, and Mac Catalyst.\n  USE FOR: \"safe area\", \"edge-to-edge\", \"SafeAreaEdges\", \"SafeAreaRegions\",\n  \"keyboard avoidance\", \"notch insets\", \"status bar overlap\", \"iOS safe area\",\n  \"Android edge-to-edge\", \"content behind status bar\", \"UseSafeArea migration\",\n  \"soft input keyboard\", \"IgnoreSafeArea replacement\".\n  DO NOT USE FOR: general layout or grid design (use Grid and StackLayout),\n  app lifecycle handling (use maui-app-lifecycle), theming or styling\n  (use maui-theming), or Shell navigation structure.\nlicense: MIT\n---\n\n# Safe Area & Edge-to-Edge Layout (.NET 10+)\n\n.NET 10 introduces a **brand-new, cross-platform safe area API** that replaces the legacy iOS-only `UseSafeArea` and the layout-level `IgnoreSafeArea` properties. The new `SafeAreaEdges` property and `SafeAreaRegions` flags enum give you per-edge, per-control safe area management on Android, iOS, and Mac Catalyst from a single API surface.\n\n> **This is new API surface in .NET 10.** If the project targets .NET 9 or earlier, these APIs do not exist. Guide the developer to the legacy `ios:Page.UseSafeArea` and `Layout.IgnoreSafeArea` properties instead.\n\n## When to Use\n\n- Content overlaps status bar, notch, Dynamic Island, or home indicator after upgrading to .NET 10\n- Implementing edge-to-edge \u002F immersive layouts (photo viewers, video players, maps)\n- Keyboard avoidance for chat or form UIs\n- Migrating from `ios:Page.UseSafeArea`, `Layout.IgnoreSafeArea`, or `WindowSoftInputModeAdjust.Resize`\n- Blazor Hybrid apps that need CSS `env(safe-area-inset-*)` coordination\n- Mixed layouts with an edge-to-edge header but a safe-area-respecting body\n\n## When Not to Use\n\n- Projects targeting .NET 9 or earlier — use the legacy iOS-specific APIs\n- General page layout questions unrelated to system bars or keyboard — use standard layout guidance\n- App lifecycle or navigation structure — use maui-app-lifecycle or Shell guidance\n- Theming or visual styling — use the **maui-theming** skill\n\n## Inputs\n\n- Target framework: must be `net10.0-*` or later for the new APIs\n- Target platforms: Android, iOS, Mac Catalyst (Windows does not have system bar insets)\n- UI approach: XAML\u002FC#, Blazor Hybrid, or MauiReactor\n\n## SafeAreaRegions Enum\n\n```csharp\n[Flags]\npublic enum SafeAreaRegions\n{\n    None      = 0,       \u002F\u002F Edge-to-edge — no safe area padding\n    SoftInput = 1 \u003C\u003C 0,  \u002F\u002F Pad to avoid the on-screen keyboard\n    Container = 1 \u003C\u003C 1,  \u002F\u002F Stay inside status bar, notch, home indicator\n    Default   = -1,      \u002F\u002F Use the platform default for the control type\n    All       = 1 \u003C\u003C 15  \u002F\u002F Respect all safe area insets (most restrictive)\n}\n```\n\n`SoftInput` and `Container` are combinable flags:\n`SafeAreaRegions.Container | SafeAreaRegions.SoftInput` = respect system bars **and** keyboard.\n\n## SafeAreaEdges Struct\n\n```csharp\npublic readonly struct SafeAreaEdges\n{\n    public SafeAreaRegions Left { get; }\n    public SafeAreaRegions Top { get; }\n    public SafeAreaRegions Right { get; }\n    public SafeAreaRegions Bottom { get; }\n\n    \u002F\u002F Uniform — same value for all four edges\n    public SafeAreaEdges(SafeAreaRegions uniformValue)\n\n    \u002F\u002F Horizontal \u002F Vertical\n    public SafeAreaEdges(SafeAreaRegions horizontal, SafeAreaRegions vertical)\n\n    \u002F\u002F Per-edge\n    public SafeAreaEdges(SafeAreaRegions left, SafeAreaRegions top,\n                         SafeAreaRegions right, SafeAreaRegions bottom)\n}\n```\n\nStatic presets: `SafeAreaEdges.None`, `SafeAreaEdges.All`, `SafeAreaEdges.Default`.\n\n### XAML Type Converter\n\nFollows Thickness-like comma-separated syntax:\n\n```xaml\n\u003C!-- Uniform -->\nSafeAreaEdges=\"Container\"\n\n\u003C!-- Horizontal, Vertical -->\nSafeAreaEdges=\"Container, SoftInput\"\n\n\u003C!-- Left, Top, Right, Bottom -->\nSafeAreaEdges=\"Container, Container, Container, SoftInput\"\n```\n\n## Control Defaults\n\n| Control | Default | Notes |\n|---------|---------|-------|\n| `ContentPage` | `None` | Edge-to-edge. **Breaking change from .NET 9 on Android.** |\n| `Layout` (Grid, StackLayout, etc.) | `Container` | Respects bars\u002Fnotch, flows under keyboard |\n| `ScrollView` | `Default` | iOS maps to automatic content insets. Only `Container` and `None` take effect. |\n| `ContentView` | `None` | Inherits parent behavior |\n| `Border` | `None` | Inherits parent behavior |\n\n## Breaking Changes from .NET 9\n\n### ContentPage default changed to `None`\n\nIn .NET 9, Android `ContentPage` behaved like `Container`. In .NET 10, the default is `None` on **all platforms**. If your Android content goes behind the status bar after upgrading:\n\n```xaml\n\u003C!-- .NET 10 default — content extends under status bar -->\n\u003CContentPage>\n\n\u003C!-- Restore .NET 9 Android behavior -->\n\u003CContentPage SafeAreaEdges=\"Container\">\n```\n\n### WindowSoftInputModeAdjust.Resize removed\n\nIf you used `WindowSoftInputModeAdjust.Resize` in .NET 9, replace it with `SafeAreaEdges=\"All\"` on the ContentPage for equivalent keyboard avoidance.\n\n## Usage Patterns\n\n### Edge-to-edge immersive content\n\nSet `None` on **both** page and layout — layouts default to `Container`:\n\n```xaml\n\u003CContentPage SafeAreaEdges=\"None\">\n    \u003CGrid SafeAreaEdges=\"None\">\n        \u003CImage Source=\"background.jpg\" Aspect=\"AspectFill\" \u002F>\n        \u003CVerticalStackLayout Padding=\"20\" VerticalOptions=\"End\">\n            \u003CLabel Text=\"Overlay text\" TextColor=\"White\" FontSize=\"24\" \u002F>\n        \u003C\u002FVerticalStackLayout>\n    \u003C\u002FGrid>\n\u003C\u002FContentPage>\n```\n\n### Forms and critical content\n\n```xaml\n\u003CContentPage SafeAreaEdges=\"All\">\n    \u003CVerticalStackLayout Padding=\"20\">\n        \u003CLabel Text=\"Safe content\" FontSize=\"18\" \u002F>\n        \u003CEntry Placeholder=\"Enter text\" \u002F>\n        \u003CButton Text=\"Submit\" \u002F>\n    \u003C\u002FVerticalStackLayout>\n\u003C\u002FContentPage>\n```\n\n### Keyboard-aware chat layout\n\n```xaml\n\u003CContentPage>\n    \u003CGrid RowDefinitions=\"*,Auto\"\n          SafeAreaEdges=\"Container, Container, Container, SoftInput\">\n        \u003CScrollView Grid.Row=\"0\">\n            \u003CVerticalStackLayout Padding=\"20\" Spacing=\"10\">\n                \u003CLabel Text=\"Messages\" FontSize=\"24\" \u002F>\n            \u003C\u002FVerticalStackLayout>\n        \u003C\u002FScrollView>\n        \u003CBorder Grid.Row=\"1\" BackgroundColor=\"LightGray\" Padding=\"20\">\n            \u003CGrid ColumnDefinitions=\"*,Auto\" Spacing=\"10\">\n                \u003CEntry Placeholder=\"Type a message...\" \u002F>\n                \u003CButton Grid.Column=\"1\" Text=\"Send\" \u002F>\n            \u003C\u002FGrid>\n        \u003C\u002FBorder>\n    \u003C\u002FGrid>\n\u003C\u002FContentPage>\n```\n\n### Mixed: edge-to-edge header + safe body + keyboard footer\n\n```xaml\n\u003CContentPage SafeAreaEdges=\"None\">\n    \u003CGrid RowDefinitions=\"Auto,*,Auto\">\n        \u003CGrid BackgroundColor=\"{StaticResource Primary}\">\n            \u003CLabel Text=\"App Header\" TextColor=\"White\" Margin=\"20,40,20,20\" \u002F>\n        \u003C\u002FGrid>\n        \u003CScrollView Grid.Row=\"1\" SafeAreaEdges=\"Container\">\n            \u003C!-- Use Container, not All — ScrollView only honors Container and None -->\n            \u003CVerticalStackLayout Padding=\"20\">\n                \u003CLabel Text=\"Main content\" \u002F>\n            \u003C\u002FVerticalStackLayout>\n        \u003C\u002FScrollView>\n        \u003CGrid Grid.Row=\"2\" SafeAreaEdges=\"SoftInput\"\n              BackgroundColor=\"LightGray\" Padding=\"20\">\n            \u003CEntry Placeholder=\"Type a message...\" \u002F>\n        \u003C\u002FGrid>\n    \u003C\u002FGrid>\n\u003C\u002FContentPage>\n```\n\n### Programmatic (C#)\n\n```csharp\nvar page = new ContentPage\n{\n    SafeAreaEdges = SafeAreaEdges.All\n};\n\nvar grid = new Grid\n{\n    SafeAreaEdges = new SafeAreaEdges(\n        left: SafeAreaRegions.Container,\n        top: SafeAreaRegions.Container,\n        right: SafeAreaRegions.Container,\n        bottom: SafeAreaRegions.SoftInput)\n};\n```\n\n## Decision Framework\n\n| Scenario | SafeAreaEdges value |\n|----------|---------------------|\n| Forms, critical inputs | `All` |\n| Photo viewer, video player, game | `None` (on page **and** layout) |\n| Scrollable content with fixed header\u002Ffooter | `Container` |\n| Chat\u002Fmessaging with bottom input bar | Per-edge: `Container, Container, Container, SoftInput` |\n| Blazor Hybrid app | `None` on page; CSS `env()` for insets |\n\n## Blazor Hybrid Integration\n\nFor Blazor Hybrid apps, let CSS handle safe areas to avoid double-padding.\n\n1. **Page stays edge-to-edge** (default in .NET 10):\n\n```xaml\n\u003CContentPage SafeAreaEdges=\"None\">\n    \u003CBlazorWebView HostPage=\"wwwroot\u002Findex.html\">\n        \u003CBlazorWebView.RootComponents>\n            \u003CRootComponent Selector=\"#app\" ComponentType=\"{x:Type local:Routes}\" \u002F>\n        \u003C\u002FBlazorWebView.RootComponents>\n    \u003C\u002FBlazorWebView>\n\u003C\u002FContentPage>\n```\n\n2. **Add `viewport-fit=cover`** in `index.html`:\n\n```html\n\u003Cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1.0,\n      maximum-scale=1.0, user-scalable=no, viewport-fit=cover\" \u002F>\n```\n\n3. **Use CSS `env()` functions**:\n\n```css\nbody {\n    padding-top: env(safe-area-inset-top);\n    padding-bottom: env(safe-area-inset-bottom);\n    padding-left: env(safe-area-inset-left);\n    padding-right: env(safe-area-inset-right);\n}\n```\n\nAvailable CSS environment variables: `env(safe-area-inset-top)`, `env(safe-area-inset-bottom)`, `env(safe-area-inset-left)`, `env(safe-area-inset-right)`.\n\n## Migration from Legacy APIs\n\n| Legacy (.NET 9 and earlier) | New (.NET 10+) |\n|-----------------------------|----------------|\n| `ios:Page.UseSafeArea=\"True\"` | `SafeAreaEdges=\"Container\"` |\n| `Layout.IgnoreSafeArea=\"True\"` | `SafeAreaEdges=\"None\"` |\n| `WindowSoftInputModeAdjust.Resize` | `SafeAreaEdges=\"All\"` on ContentPage |\n\nThe legacy properties still compile but are marked obsolete. `IgnoreSafeArea=\"True\"` maps internally to `SafeAreaRegions.None`.\n\n```xaml\n\u003C!-- .NET 9 (legacy, iOS-only) -->\n\u003CContentPage xmlns:ios=\"clr-namespace:Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific;assembly=Microsoft.Maui.Controls\"\n             ios:Page.UseSafeArea=\"True\">\n\n\u003C!-- .NET 10+ (cross-platform) -->\n\u003CContentPage SafeAreaEdges=\"Container\">\n```\n\n## Platform-Specific Behavior\n\n### iOS & Mac Catalyst\n\n- Safe area insets cover: status bar, navigation bar, tab bar, notch\u002FDynamic Island, home indicator\n- `SoftInput` includes the keyboard when visible\n- Insets update automatically on rotation and UI visibility changes\n- `ScrollView` with `Default` maps to `UIScrollViewContentInsetAdjustmentBehavior.Automatic`\n\nTransparent navigation bar for content behind the nav bar:\n\n```xaml\n\u003CShell Shell.BackgroundColor=\"#80000000\" Shell.NavBarHasShadow=\"False\" \u002F>\n```\n\n### Android\n\n- Safe area insets cover: system bars (status\u002Fnavigation) and display cutouts\n- `SoftInput` includes the soft keyboard\n- MAUI uses `WindowInsetsCompat` and `WindowInsetsAnimationCompat` internally\n- Behavior varies by Android version and OEM edge-to-edge settings\n\n## Common Pitfalls\n\n1. **Forgetting to set `None` on the layout too.** `ContentPage SafeAreaEdges=\"None\"` makes the page edge-to-edge, but child layouts default to `Container` and still pad inward. Set `None` on both page and layout for truly immersive content.\n\n2. **Using `SoftInput` directly on ScrollView.** ScrollView manages its own content insets and ignores `SoftInput`. Wrap the ScrollView in a Grid or StackLayout and apply `SoftInput` there.\n\n3. **Confusing `Default` with `None`.** `Default` means \"platform default for this control type\" — on ScrollView (iOS) this enables automatic content insets. `None` means \"no safe area padding at all.\"\n\n4. **Double-padding in Blazor Hybrid.** Setting `SafeAreaEdges=\"Container\"` on the page **and** using CSS `env(safe-area-inset-*)` results in doubled insets. Pick one approach — CSS is recommended for Blazor.\n\n5. **Missing `viewport-fit=cover` in Blazor.** Without this meta tag, CSS `env(safe-area-inset-*)` values are always zero on iOS.\n\n6. **Assuming .NET 9 behavior on Android.** After upgrading to .NET 10, Android `ContentPage` defaults to `None` (was effectively `Container`). Add `SafeAreaEdges=\"Container\"` to restore the previous behavior.\n\n7. **Using legacy `ios:Page.UseSafeArea` in new code.** The old API is iOS-only and obsolete. Always use `SafeAreaEdges` for cross-platform safe area management.\n\n## Checklist\n\n- [ ] Android upgrade: `SafeAreaEdges=\"Container\"` added if content goes under status bar\n- [ ] Edge-to-edge: `None` set on **both** page and layout\n- [ ] ScrollView keyboard avoidance uses wrapper Grid, not ScrollView's own `SafeAreaEdges`\n- [ ] Blazor Hybrid: using either XAML or CSS safe areas, not both\n- [ ] `viewport-fit=cover` in Blazor's `index.html` `\u003Cmeta viewport>` tag\n- [ ] Legacy `UseSafeArea` \u002F `IgnoreSafeArea` migrated to `SafeAreaEdges`\n","# Safe Area & Edge-to-Edge Layout (.NET 10+)\n\n.NET 10 introduces a **brand-new, cross-platform safe area API** that replaces the legacy iOS-only `UseSafeArea` and the layout-level `IgnoreSafeArea` properties. The new `SafeAreaEdges` property and `SafeAreaRegions` flags enum give you per-edge, per-control safe area management on Android, iOS, and Mac Catalyst from a single API surface.\n\n> **This is new API surface in .NET 10.** If the project targets .NET 9 or earlier, these APIs do not exist. Guide the developer to the legacy `ios:Page.UseSafeArea` and `Layout.IgnoreSafeArea` properties instead.\n\n## When to Use\n\n- Content overlaps status bar, notch, Dynamic Island, or home indicator after upgrading to .NET 10\n- Implementing edge-to-edge \u002F immersive layouts (photo viewers, video players, maps)\n- Keyboard avoidance for chat or form UIs\n- Migrating from `ios:Page.UseSafeArea`, `Layout.IgnoreSafeArea`, or `WindowSoftInputModeAdjust.Resize`\n- Blazor Hybrid apps that need CSS `env(safe-area-inset-*)` coordination\n- Mixed layouts with an edge-to-edge header but a safe-area-respecting body\n\n## When Not to Use\n\n- Projects targeting .NET 9 or earlier — use the legacy iOS-specific APIs\n- General page layout questions unrelated to system bars or keyboard — use standard layout guidance\n- App lifecycle or navigation structure — use maui-app-lifecycle or Shell guidance\n- Theming or visual styling — use the **maui-theming** skill\n\n## Inputs\n\n- Target framework: must be `net10.0-*` or later for the new APIs\n- Target platforms: Android, iOS, Mac Catalyst (Windows does not have system bar insets)\n- UI approach: XAML\u002FC#, Blazor Hybrid, or MauiReactor\n\n## SafeAreaRegions Enum\n\n```csharp\n[Flags]\npublic enum SafeAreaRegions\n{\n    None      = 0,       \u002F\u002F Edge-to-edge — no safe area padding\n    SoftInput = 1 \u003C\u003C 0,  \u002F\u002F Pad to avoid the on-screen keyboard\n    Container = 1 \u003C\u003C 1,  \u002F\u002F Stay inside status bar, notch, home indicator\n    Default   = -1,      \u002F\u002F Use the platform default for the control type\n    All       = 1 \u003C\u003C 15  \u002F\u002F Respect all safe area insets (most restrictive)\n}\n```\n\n`SoftInput` and `Container` are combinable flags:\n`SafeAreaRegions.Container | SafeAreaRegions.SoftInput` = respect system bars **and** keyboard.\n\n## SafeAreaEdges Struct\n\n```csharp\npublic readonly struct SafeAreaEdges\n{\n    public SafeAreaRegions Left { get; }\n    public SafeAreaRegions Top { get; }\n    public SafeAreaRegions Right { get; }\n    public SafeAreaRegions Bottom { get; }\n\n    \u002F\u002F Uniform — same value for all four edges\n    public SafeAreaEdges(SafeAreaRegions uniformValue)\n\n    \u002F\u002F Horizontal \u002F Vertical\n    public SafeAreaEdges(SafeAreaRegions horizontal, SafeAreaRegions vertical)\n\n    \u002F\u002F Per-edge\n    public SafeAreaEdges(SafeAreaRegions left, SafeAreaRegions top,\n                         SafeAreaRegions right, SafeAreaRegions bottom)\n}\n```\n\nStatic presets: `SafeAreaEdges.None`, `SafeAreaEdges.All`, `SafeAreaEdges.Default`.\n\n### XAML Type Converter\n\nFollows Thickness-like comma-separated syntax:\n\n```xaml\n\u003C!-- Uniform -->\nSafeAreaEdges=\"Container\"\n\n\u003C!-- Horizontal, Vertical -->\nSafeAreaEdges=\"Container, SoftInput\"\n\n\u003C!-- Left, Top, Right, Bottom -->\nSafeAreaEdges=\"Container, Container, Container, SoftInput\"\n```\n\n## Control Defaults\n\n| Control | Default | Notes |\n|---------|---------|-------|\n| `ContentPage` | `None` | Edge-to-edge. **Breaking change from .NET 9 on Android.** |\n| `Layout` (Grid, StackLayout, etc.) | `Container` | Respects bars\u002Fnotch, flows under keyboard |\n| `ScrollView` | `Default` | iOS maps to automatic content insets. Only `Container` and `None` take effect. |\n| `ContentView` | `None` | Inherits parent behavior |\n| `Border` | `None` | Inherits parent behavior |\n\n## Breaking Changes from .NET 9\n\n### ContentPage default changed to `None`\n\nIn .NET 9, Android `ContentPage` behaved like `Container`. In .NET 10, the default is `None` on **all platforms**. If your Android content goes behind the status bar after upgrading:\n\n```xaml\n\u003C!-- .NET 10 default — content extends under status bar -->\n\u003CContentPage>\n\n\u003C!-- Restore .NET 9 Android behavior -->\n\u003CContentPage SafeAreaEdges=\"Container\">\n```\n\n### WindowSoftInputModeAdjust.Resize removed\n\nIf you used `WindowSoftInputModeAdjust.Resize` in .NET 9, replace it with `SafeAreaEdges=\"All\"` on the ContentPage for equivalent keyboard avoidance.\n\n## Usage Patterns\n\n### Edge-to-edge immersive content\n\nSet `None` on **both** page and layout — layouts default to `Container`:\n\n```xaml\n\u003CContentPage SafeAreaEdges=\"None\">\n    \u003CGrid SafeAreaEdges=\"None\">\n        \u003CImage Source=\"background.jpg\" Aspect=\"AspectFill\" \u002F>\n        \u003CVerticalStackLayout Padding=\"20\" VerticalOptions=\"End\">\n            \u003CLabel Text=\"Overlay text\" TextColor=\"White\" FontSize=\"24\" \u002F>\n        \u003C\u002FVerticalStackLayout>\n    \u003C\u002FGrid>\n\u003C\u002FContentPage>\n```\n\n### Forms and critical content\n\n```xaml\n\u003CContentPage SafeAreaEdges=\"All\">\n    \u003CVerticalStackLayout Padding=\"20\">\n        \u003CLabel Text=\"Safe content\" FontSize=\"18\" \u002F>\n        \u003CEntry Placeholder=\"Enter text\" \u002F>\n        \u003CButton Text=\"Submit\" \u002F>\n    \u003C\u002FVerticalStackLayout>\n\u003C\u002FContentPage>\n```\n\n### Keyboard-aware chat layout\n\n```xaml\n\u003CContentPage>\n    \u003CGrid RowDefinitions=\"*,Auto\"\n          SafeAreaEdges=\"Container, Container, Container, SoftInput\">\n        \u003CScrollView Grid.Row=\"0\">\n            \u003CVerticalStackLayout Padding=\"20\" Spacing=\"10\">\n                \u003CLabel Text=\"Messages\" FontSize=\"24\" \u002F>\n            \u003C\u002FVerticalStackLayout>\n        \u003C\u002FScrollView>\n        \u003CBorder Grid.Row=\"1\" BackgroundColor=\"LightGray\" Padding=\"20\">\n            \u003CGrid ColumnDefinitions=\"*,Auto\" Spacing=\"10\">\n                \u003CEntry Placeholder=\"Type a message...\" \u002F>\n                \u003CButton Grid.Column=\"1\" Text=\"Send\" \u002F>\n            \u003C\u002FGrid>\n        \u003C\u002FBorder>\n    \u003C\u002FGrid>\n\u003C\u002FContentPage>\n```\n\n### Mixed: edge-to-edge header + safe body + keyboard footer\n\n```xaml\n\u003CContentPage SafeAreaEdges=\"None\">\n    \u003CGrid RowDefinitions=\"Auto,*,Auto\">\n        \u003CGrid BackgroundColor=\"{StaticResource Primary}\">\n            \u003CLabel Text=\"App Header\" TextColor=\"White\" Margin=\"20,40,20,20\" \u002F>\n        \u003C\u002FGrid>\n        \u003CScrollView Grid.Row=\"1\" SafeAreaEdges=\"Container\">\n            \u003C!-- Use Container, not All — ScrollView only honors Container and None -->\n            \u003CVerticalStackLayout Padding=\"20\">\n                \u003CLabel Text=\"Main content\" \u002F>\n            \u003C\u002FVerticalStackLayout>\n        \u003C\u002FScrollView>\n        \u003CGrid Grid.Row=\"2\" SafeAreaEdges=\"SoftInput\"\n              BackgroundColor=\"LightGray\" Padding=\"20\">\n            \u003CEntry Placeholder=\"Type a message...\" \u002F>\n        \u003C\u002FGrid>\n    \u003C\u002FGrid>\n\u003C\u002FContentPage>\n```\n\n### Programmatic (C#)\n\n```csharp\nvar page = new ContentPage\n{\n    SafeAreaEdges = SafeAreaEdges.All\n};\n\nvar grid = new Grid\n{\n    SafeAreaEdges = new SafeAreaEdges(\n        left: SafeAreaRegions.Container,\n        top: SafeAreaRegions.Container,\n        right: SafeAreaRegions.Container,\n        bottom: SafeAreaRegions.SoftInput)\n};\n```\n\n## Decision Framework\n\n| Scenario | SafeAreaEdges value |\n|----------|---------------------|\n| Forms, critical inputs | `All` |\n| Photo viewer, video player, game | `None` (on page **and** layout) |\n| Scrollable content with fixed header\u002Ffooter | `Container` |\n| Chat\u002Fmessaging with bottom input bar | Per-edge: `Container, Container, Container, SoftInput` |\n| Blazor Hybrid app | `None` on page; CSS `env()` for insets |\n\n## Blazor Hybrid Integration\n\nFor Blazor Hybrid apps, let CSS handle safe areas to avoid double-padding.\n\n1. **Page stays edge-to-edge** (default in .NET 10):\n\n```xaml\n\u003CContentPage SafeAreaEdges=\"None\">\n    \u003CBlazorWebView HostPage=\"wwwroot\u002Findex.html\">\n        \u003CBlazorWebView.RootComponents>\n            \u003CRootComponent Selector=\"#app\" ComponentType=\"{x:Type local:Routes}\" \u002F>\n        \u003C\u002FBlazorWebView.RootComponents>\n    \u003C\u002FBlazorWebView>\n\u003C\u002FContentPage>\n```\n\n2. **Add `viewport-fit=cover`** in `index.html`:\n\n```html\n\u003Cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1.0,\n      maximum-scale=1.0, user-scalable=no, viewport-fit=cover\" \u002F>\n```\n\n3. **Use CSS `env()` functions**:\n\n```css\nbody {\n    padding-top: env(safe-area-inset-top);\n    padding-bottom: env(safe-area-inset-bottom);\n    padding-left: env(safe-area-inset-left);\n    padding-right: env(safe-area-inset-right);\n}\n```\n\nAvailable CSS environment variables: `env(safe-area-inset-top)`, `env(safe-area-inset-bottom)`, `env(safe-area-inset-left)`, `env(safe-area-inset-right)`.\n\n## Migration from Legacy APIs\n\n| Legacy (.NET 9 and earlier) | New (.NET 10+) |\n|-----------------------------|----------------|\n| `ios:Page.UseSafeArea=\"True\"` | `SafeAreaEdges=\"Container\"` |\n| `Layout.IgnoreSafeArea=\"True\"` | `SafeAreaEdges=\"None\"` |\n| `WindowSoftInputModeAdjust.Resize` | `SafeAreaEdges=\"All\"` on ContentPage |\n\nThe legacy properties still compile but are marked obsolete. `IgnoreSafeArea=\"True\"` maps internally to `SafeAreaRegions.None`.\n\n```xaml\n\u003C!-- .NET 9 (legacy, iOS-only) -->\n\u003CContentPage xmlns:ios=\"clr-namespace:Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific;assembly=Microsoft.Maui.Controls\"\n             ios:Page.UseSafeArea=\"True\">\n\n\u003C!-- .NET 10+ (cross-platform) -->\n\u003CContentPage SafeAreaEdges=\"Container\">\n```\n\n## Platform-Specific Behavior\n\n### iOS & Mac Catalyst\n\n- Safe area insets cover: status bar, navigation bar, tab bar, notch\u002FDynamic Island, home indicator\n- `SoftInput` includes the keyboard when visible\n- Insets update automatically on rotation and UI visibility changes\n- `ScrollView` with `Default` maps to `UIScrollViewContentInsetAdjustmentBehavior.Automatic`\n\nTransparent navigation bar for content behind the nav bar:\n\n```xaml\n\u003CShell Shell.BackgroundColor=\"#80000000\" Shell.NavBarHasShadow=\"False\" \u002F>\n```\n\n### Android\n\n- Safe area insets cover: system bars (status\u002Fnavigation) and display cutouts\n- `SoftInput` includes the soft keyboard\n- MAUI uses `WindowInsetsCompat` and `WindowInsetsAnimationCompat` internally\n- Behavior varies by Android version and OEM edge-to-edge settings\n\n## Common Pitfalls\n\n1. **Forgetting to set `None` on the layout too.** `ContentPage SafeAreaEdges=\"None\"` makes the page edge-to-edge, but child layouts default to `Container` and still pad inward. Set `None` on both page and layout for truly immersive content.\n\n2. **Using `SoftInput` directly on ScrollView.** ScrollView manages its own content insets and ignores `SoftInput`. Wrap the ScrollView in a Grid or StackLayout and apply `SoftInput` there.\n\n3. **Confusing `Default` with `None`.** `Default` means \"platform default for this control type\" — on ScrollView (iOS) this enables automatic content insets. `None` means \"no safe area padding at all.\"\n\n4. **Double-padding in Blazor Hybrid.** Setting `SafeAreaEdges=\"Container\"` on the page **and** using CSS `env(safe-area-inset-*)` results in doubled insets. Pick one approach — CSS is recommended for Blazor.\n\n5. **Missing `viewport-fit=cover` in Blazor.** Without this meta tag, CSS `env(safe-area-inset-*)` values are always zero on iOS.\n\n6. **Assuming .NET 9 behavior on Android.** After upgrading to .NET 10, Android `ContentPage` defaults to `None` (was effectively `Container`). Add `SafeAreaEdges=\"Container\"` to restore the previous behavior.\n\n7. **Using legacy `ios:Page.UseSafeArea` in new code.** The old API is iOS-only and obsolete. Always use `SafeAreaEdges` for cross-platform safe area management.\n\n## Checklist\n\n- [ ] Android upgrade: `SafeAreaEdges=\"Container\"` added if content goes under status bar\n- [ ] Edge-to-edge: `None` set on **both** page and layout\n- [ ] ScrollView keyboard avoidance uses wrapper Grid, not ScrollView's own `SafeAreaEdges`\n- [ ] Blazor Hybrid: using either XAML or CSS safe areas, not both\n- [ ] `viewport-fit=cover` in Blazor's `index.html` `\u003Cmeta viewport>` tag\n- [ ] Legacy `UseSafeArea` \u002F `IgnoreSafeArea` migrated to `SafeAreaEdges`\n",{"name":5,"license":15,"description":7},"main","5810d492c9b301d8227f932bf87b5c954c4fa4d6","plugins\u002Fdotnet-maui\u002Fskills\u002Fmaui-safe-area","https:\u002F\u002Fgithub.com\u002Fweiflycc-cmd\u002Fskills","https:\u002F\u002Fgithub.com\u002Fweiflycc-cmd","weiflycc.com","2026-11-10 03:26:55",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add weiflycc-cmd\u002Fskills --skill maui-safe-area",{"tool":37,"command":38},"bunx","bunx skills add weiflycc-cmd\u002Fskills --skill maui-safe-area",{"tool":40,"command":41},"pnpm","pnpm dlx skills add weiflycc-cmd\u002Fskills --skill maui-safe-area","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fweiflycc-cmd\u002Fskills\u002Fblob\u002Fmain\u002Fplugins\u002Fdotnet-maui\u002Fskills\u002Fmaui-safe-area\u002FSKILL.md",true,[45],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"references\u002Fsafe-area-api.md","REFERENCE","参考文档",8635,"https:\u002F\u002Fgithub.com\u002Fweiflycc-cmd\u002Fskills\u002Fblob\u002Fmain\u002Fplugins\u002Fdotnet-maui\u002Fskills\u002Fmaui-safe-area\u002Freferences\u002Fsafe-area-api.md",[52,59,66,73,80,87],{"skillNo":53,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":19},"01M76SGT4WG5682JQJ0V3NSK6X","system-text-json-net11","Provides guidance on new System.Text.Json APIs introduced in .NET 11. It covers typed JsonTypeInfo access via GetTypeInfo\u003CT> and TryGetTypeInfo\u003CT> on JsonSerializerOptions, and the new JsonNamingPolicy.PascalCase static property. Use when serializing or deserializing JSON in .NET 11 applications and needing typed metadata access or PascalCase property naming.","https:\u002F\u002Fgithub.com\u002Fweiflycc-cmd\u002Fskills\u002Fblob\u002Fmain\u002Fplugins\u002Fdotnet11\u002Fskills\u002Fsystem-text-json-net11\u002FSKILL.md",[],[],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":19},"01M76SGPNZYYV9BCZJW7BF7J8A","nuget-trusted-publishing","Set up NuGet trusted publishing (OIDC) on a GitHub Actions repo — replaces long-lived API keys with short-lived tokens. USE FOR: trusted publishing, NuGet OIDC, keyless NuGet publish, migrate from NuGet API key, NuGet\u002Flogin, secure NuGet publishing. DO NOT USE FOR: publishing to private feeds or Azure Artifacts (OIDC is nuget.org only). INVOKES: shell (powershell or bash), edit, create, ask_user for guided repo setup.","https:\u002F\u002Fgithub.com\u002Fweiflycc-cmd\u002Fskills\u002Fblob\u002Fmain\u002Fplugins\u002Fdotnet\u002Fskills\u002Fnuget-trusted-publishing\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":19},"01M76SGHVNBNVM1DMVDYTMAE5G","dotnet-pinvoke","Correctly call native (C\u002FC++) libraries from .NET using P\u002FInvoke and LibraryImport. Covers function signatures, string marshalling, memory lifetime, SafeHandle, and cross-platform patterns. USE FOR: writing new P\u002FInvoke or LibraryImport declarations, reviewing or debugging existing native interop code, wrapping a C or C++ library for use in .NET, diagnosing crashes, memory leaks, or corruption at the managed\u002Fnative boundary. DO NOT USE FOR: COM interop, C++\u002FCLI mixed-mode assemblies, or pure managed code with no native dependencies.","https:\u002F\u002Fgithub.com\u002Fweiflycc-cmd\u002Fskills\u002Fblob\u002Fmain\u002Fplugins\u002Fdotnet\u002Fskills\u002Fdotnet-pinvoke\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":19},"01M76SGDB9Z3GSB1CFW314NC84","csharp-scripts","Run file-based C# apps with the .NET CLI when the user explicitly wants C#\u002F.NET code without creating a project. Use for C# language\u002FAPI experiments, one-file C# apps, small multi-file C# apps composed with `#:include`\u002F`#:exclude`, or C# file-based apps linked with `#:ref`. Do not use for language-agnostic throwaway scripts, generic computations, Python\u002FPowerShell-style automation, full projects, or existing app integration.","https:\u002F\u002Fgithub.com\u002Fweiflycc-cmd\u002Fskills\u002Fblob\u002Fmain\u002Fplugins\u002Fdotnet\u002Fskills\u002Fcsharp-scripts\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M76SG805T8W764WAKB1NP3CJ","thread-abort-migration","Guides migration of .NET Framework Thread.Abort usage to cooperative cancellation in modern .NET. USE FOR: modernizing code that calls Thread.Abort, catching ThreadAbortException, replacing Thread.ResetAbort, replacing Thread.Interrupt for thread termination, resolving PlatformNotSupportedException or SYSLIB0006 after retargeting to .NET 6+, migrating ASP.NET Response.End or Response.Redirect(url, true) which internally call Thread.Abort. DO NOT USE FOR: code that only uses Thread.Join, Thread.Sleep, or Thread.Start without any abort, interrupt, or ThreadAbortException usage — these APIs work identically in modern .NET and need no migration. Also not for projects staying on .NET Framework, or Thread.Abort usage inside third-party libraries you do not control.","https:\u002F\u002Fgithub.com\u002Fweiflycc-cmd\u002Fskills\u002Fblob\u002Fmain\u002Fplugins\u002Fdotnet-upgrade\u002Fskills\u002Fthread-abort-migration\u002FSKILL.md",[],[],{"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":93,"publishedAt":19},"01M76SG2588ZJBE5C51HYJJSKV","migrate-nullable-references","Enable nullable reference types in a C# project and systematically resolve all warnings. USE FOR: adopting NRTs in existing codebases, file-by-file or project-wide migration, fixing CS8602\u002FCS8618\u002FCS86xx warnings, annotating APIs for nullability, cleaning up null-forgiving operators, upgrading dependencies with new nullable annotations. DO NOT USE FOR: projects already fully migrated with zero warnings (unless auditing suppressions), fixing a handful of nullable warnings in code that already has NRTs enabled, suppressing warnings without fixing them, C# 7.3 or earlier projects. INVOKES: Get-NullableReadiness.ps1 scanner script.","https:\u002F\u002Fgithub.com\u002Fweiflycc-cmd\u002Fskills\u002Fblob\u002Fmain\u002Fplugins\u002Fdotnet-upgrade\u002Fskills\u002Fmigrate-nullable-references\u002FSKILL.md",[],[]]