[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7D1VKSDVVNBNQ93Z09X2HT0":3,"skill-same:01M7D1VKSDVVNBNQ93Z09X2HT0":50},{"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":6,"ownerDescription":6,"updatedAt":29,"install":30,"resources":43},"01M7D1VKSDVVNBNQ93Z09X2HT0","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.","itsmejay18\u002FAI-Skills-for-My-Development-Stack","itsmejay18","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F167779943?v=4","01M7CZRFC6DDZA5V2CX8WDSZED","Jay Jemino Ababon ","01M7CZRFCVRNW1SFHSQXEJ3CQN",0,"MIT","https:\u002F\u002Fgithub.com\u002Fitsmejay18\u002FAI-Skills-for-My-Development-Stack\u002Fblob\u002Fmain\u002F10-Mobile-Development\u002Fmaui-safe-area\u002FSKILL.md",[],[],"2026-11-15 14:19:17",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 superseded\n\n`WindowSoftInputModeAdjust.Resize` still exists and still compiles (it is not removed and not obsolete), but it is Android-only. For cross-platform keyboard avoidance prefer `SafeAreaEdges=\"All\"` (or the `SoftInput` region) on the ContentPage.\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 `ios:Page.UseSafeArea` and `Layout.IgnoreSafeArea` properties still compile but are marked obsolete. `IgnoreSafeArea=\"True\"` maps internally to `SafeAreaRegions.None`. `WindowSoftInputModeAdjust.Resize` is **not** obsolete — it remains supported, but is Android-only.\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 superseded\n\n`WindowSoftInputModeAdjust.Resize` still exists and still compiles (it is not removed and not obsolete), but it is Android-only. For cross-platform keyboard avoidance prefer `SafeAreaEdges=\"All\"` (or the `SoftInput` region) on the ContentPage.\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 `ios:Page.UseSafeArea` and `Layout.IgnoreSafeArea` properties still compile but are marked obsolete. `IgnoreSafeArea=\"True\"` maps internally to `SafeAreaRegions.None`. `WindowSoftInputModeAdjust.Resize` is **not** obsolete — it remains supported, but is Android-only.\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","30954af1dcd1a74b63f05deb2e2c41e5ecae4a82","10-Mobile-Development\u002Fmaui-safe-area","https:\u002F\u002Fgithub.com\u002Fitsmejay18\u002FAI-Skills-for-My-Development-Stack","https:\u002F\u002Fgithub.com\u002Fitsmejay18","2026-09-18 16:06:36",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add itsmejay18\u002FAI-Skills-for-My-Development-Stack --skill maui-safe-area",{"tool":36,"command":37},"bunx","bunx skills add itsmejay18\u002FAI-Skills-for-My-Development-Stack --skill maui-safe-area",{"tool":39,"command":40},"pnpm","pnpm dlx skills add itsmejay18\u002FAI-Skills-for-My-Development-Stack --skill maui-safe-area","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fitsmejay18\u002FAI-Skills-for-My-Development-Stack\u002Fblob\u002Fmain\u002F10-Mobile-Development\u002Fmaui-safe-area\u002FSKILL.md",true,[44],{"path":45,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":48,"sourceHtmlUrl":49},"references\u002Fsafe-area-api.md","REFERENCE","参考文档",8635,"https:\u002F\u002Fgithub.com\u002Fitsmejay18\u002FAI-Skills-for-My-Development-Stack\u002Fblob\u002Fmain\u002F10-Mobile-Development\u002Fmaui-safe-area\u002Freferences\u002Fsafe-area-api.md",[51,58,65,72,79,86],{"skillNo":52,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":57,"publishedAt":19},"01M7D2RKBHPZ3E1RNN5DWHT550","vectorization","Design, implement, optimize, and review SIMD code in .NET. USE FOR: vectorizing scalar loops with TensorPrimitives, Vector64\u002F128\u002F256\u002F512, or platform hardware intrinsics; reviewing existing SIMD code, including Vector\u003CT>, for contract equivalence, tail handling, memory safety, portability, fallbacks, and measured performance. DO NOT USE FOR: performance work unrelated to SIMD or vectorization.","https:\u002F\u002Fgithub.com\u002Fitsmejay18\u002FAI-Skills-for-My-Development-Stack\u002Fblob\u002Fmain\u002F20-Performance-Optimization\u002Fvectorization\u002FSKILL.md",[],[],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":19},"01M7D2RDJ7RN3QK8GJR0QTER1D","resolve-project-references","Guide for interpreting ResolveProjectReferences time in MSBuild performance summaries. Activate when ResolveProjectReferences appears as the most expensive target and developers are trying to optimize it directly. Explains that the reported time includes wait time for dependent project builds and is misleading. Guides users to focus on task self-time instead. Do not activate for general build performance -- use build-perf-diagnostics instead.","https:\u002F\u002Fgithub.com\u002Fitsmejay18\u002FAI-Skills-for-My-Development-Stack\u002Fblob\u002Fmain\u002F20-Performance-Optimization\u002Fresolve-project-references\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M7D2R1H2GTNZYHG9YRX3JDQW","optimizing-ef-core-queries","Optimize and improve the performance of slow Entity Framework Core (EF Core) queries: make them generate less SQL, make fewer database round-trips, and return results faster. Use whenever an EF Core or DbContext query or data-access path is slow or should be made faster — whether or not EF Core owns the database schema. For EF Core, not Dapper or raw ADO.NET.","https:\u002F\u002Fgithub.com\u002Fitsmejay18\u002FAI-Skills-for-My-Development-Stack\u002Fblob\u002Fmain\u002F20-Performance-Optimization\u002Foptimizing-ef-core-queries\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M7D2QREG04W1YT0NEBHEW5C9","microbenchmarking","Activate this skill when BenchmarkDotNet (BDN) is involved in the task — creating, running, configuring, or reviewing BDN benchmarks. Also activate when microbenchmarking .NET code would be useful and BenchmarkDotNet is the likely tool. Consider activating when answering a .NET performance question requires measurement and BenchmarkDotNet may be needed. Covers microbenchmark design, BDN configuration and project setup, how to run BDN microbenchmarks efficiently and effectively, and using BDN for side-by-side performance comparisons. Do NOT use for profiling\u002Ftracing .NET code (dotnet-trace, PerfView), production telemetry, or load\u002Fstress testing (Crank, k6).","https:\u002F\u002Fgithub.com\u002Fitsmejay18\u002FAI-Skills-for-My-Development-Stack\u002Fblob\u002Fmain\u002F20-Performance-Optimization\u002Fmicrobenchmarking\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M7D2QGE175XWPZVACVH2868Z","incremental-build","Guide for optimizing MSBuild incremental builds. USE FOR: builds slower than expected on subsequent runs, 'nothing changed but it rebuilds anyway', diagnosing why targets re-execute unnecessarily, fixing broken no-op builds. Covers 8 common causes: missing Inputs\u002FOutputs on custom targets, volatile properties in output paths (timestamps\u002FGUIDs), file writes outside tracked Outputs, missing FileWrites registration, glob changes, Visual Studio Fast Up-to-Date Check (FUTDC) issues. Key diagnostic: look for 'Building target completely' vs 'Skipping target' in binlog. DO NOT USE FOR: first-time build slowness (use build-perf-baseline), parallelism issues (use build-parallelism), evaluation-phase slowness (use eval-performance), non-MSBuild build systems.","https:\u002F\u002Fgithub.com\u002Fitsmejay18\u002FAI-Skills-for-My-Development-Stack\u002Fblob\u002Fmain\u002F20-Performance-Optimization\u002Fincremental-build\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M7D2Q1DQTC6K49R73WQTTPSB","eval-performance","Guide for diagnosing and improving MSBuild project evaluation performance. USE FOR: builds slow before any compilation starts, high evaluation time in binlog analysis, expensive glob patterns walking large directories (node_modules, .git, bin\u002Fobj), deep import chains (>20 levels), preprocessed output >10K lines indicating heavy evaluation, property functions with file I\u002FO ($([System.IO.File]::ReadAllText(...))), multiple evaluations per project. Covers the 5 MSBuild evaluation phases, glob optimization via DefaultItemExcludes, import chain analysis with \u002Fpp preprocessing. DO NOT USE FOR: compilation-time slowness (use build-perf-diagnostics), incremental build issues (use incremental-build), non-MSBuild build systems.","https:\u002F\u002Fgithub.com\u002Fitsmejay18\u002FAI-Skills-for-My-Development-Stack\u002Fblob\u002Fmain\u002F20-Performance-Optimization\u002Feval-performance\u002FSKILL.md",[],[]]