davidortinau/maui-skills/maui-safe-area
Claude Code and agent skill by davidortinau/maui-skills
- community
Checking that the SKILL.md file is still in the repository.
.NET MAUI safe area and edge-to-edge layout guidance for .NET 10+. Covers SafeAreaEdges property, SafeAreaRegions enum, per-edge control, keyboard avoidance, Blazor Hybrid CSS safe areas, migration from legacy 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". DO NOT USE FOR: general layout or grid design (use maui-collectionview), app lifecycle handling (use maui-app-lifecycle), or theming (use maui-theming).
Install
npx vskill@latest install davidortinau/maui-skills/maui-safe-areaSKILL.md
Safe Area — Gotchas & Best Practices (.NET 10+)
Breaking Changes
⚠️ .NET 9 → 10: ContentPage default changed to None
ContentPage now defaults to edge-to-edge (None) on all platforms. In .NET 9, Android ContentPage behaved like Container. If your Android content goes under the status bar after upgrading, add SafeAreaEdges="Container" explicitly.
⚠️ WindowSoftInputModeAdjust.Resize migration
If you used WindowSoftInputModeAdjust.Resize in .NET 9, you may need SafeAreaEdges="All" on the ContentPage to maintain keyboard avoidance.
Common Gotchas
1. Layouts default to Container, not None
For true edge-to-edge, set SafeAreaEdges="None" on both the page and layouts:
2. SoftInput on ScrollView has no effect
ScrollView manages its own content insets. Wrap it in a Grid/StackLayout instead:
3. Default is not None
Default = "use platform defaults for this control type." None = "edge-to-edge." They differ significantly on ScrollView (iOS maps Default to automatic content insets).
4. Blazor Hybrid double-padding
5. iOS Shell/NavigationPage edge-to-edge
Content won't extend behind the nav bar unless you set a transparent background AND hide the separator:
Decision Framework
| Scenario | SafeAreaEdges value | |
|---|---|---|
| Forms, critical inputs | All | |
| Photo viewer, video player, game | None (on page AND layout) | |
| Scrollable content with fixed header/footer | Container | |
| Chat/messaging with bottom input bar | Per-edge: Container, Container, Container, SoftInput | |
| Blazor Hybrid app | None on page, CSS env() for insets |
Migration Quick Reference
| Legacy (.NET 9) | New (.NET 10+) | |
|---|---|---|
ios:Page.UseSafeArea="True" | SafeAreaEdges="Container" | |
IgnoreSafeArea="True" | SafeAreaEdges="None" | |
WindowSoftInputModeAdjust.Resize | SafeAreaEdges="All" on ContentPage |
Legacy properties still work but are obsolete.
Best Practices
- Combine `SafeAreaEdges` with `Padding` — safe area handles insets,
Paddingadds visual spacing:
``xaml <ContentPage SafeAreaEdges="All"> <VerticalStackLayout Padding="20"> <!-- Both applied — no conflict --> </VerticalStackLayout> </ContentPage> ``
- Use per-control settings for mixed layouts (edge-to-edge header + safe body + keyboard-aware footer).
- For Blazor Hybrid, prefer CSS
env()and leaveSafeAreaEdges="None".
Add viewport-fit=cover to the <meta viewport> tag.
- Test on notched devices (iPhone X+, Android cutouts), tablets in landscape, and varying screen sizes.
Checklist
- [ ] Android upgrade:
SafeAreaEdges="Container"added if content goes under status bar - [ ] Edge-to-edge:
Noneset on both page and layout - [ ] ScrollView keyboard avoidance uses wrapper Grid, not ScrollView's own
SafeAreaEdges - [ ] Blazor Hybrid: using either XAML or CSS safe areas, not both
- [ ]
viewport-fit=coverin Blazor'sindex.html<meta viewport>tag - [ ] Legacy
UseSafeArea/IgnoreSafeAreamigrated toSafeAreaEdges
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/maui-skills/skills/maui-safe-area/SKILL.md
Popularity
- Repository stars
- 102
- Repository forks
- 15
- 7-day trend score
- 23
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 27 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/davidortinau/maui-skills/maui-safe-area)