.NET MAUI App Icons & Splash Screens
Common Pitfalls
β Android adaptive icon clipping
Android adaptive icons crop to a circular or squircle safe zone. If the foreground fills the canvas, it will be clipped.
<!-- β Single-layer icon β foreground fills entire canvas, gets clipped -->
<MauiIcon Include="Resources\AppIcon\appicon.svg"
Color="#512BD4" />
<!-- β
Composed icon with scaled foreground β stays in safe zone -->
<MauiIcon Include="Resources\AppIcon\appicon.svg"
ForegroundFile="Resources\AppIcon\appiconfg.svg"
ForegroundScale="0.65"
Color="#512BD4" />β Transparent splash screen Color
Some platforms ignore alpha in the splash Color and show black instead.
<!-- β Transparent color β may render as black on some platforms -->
<MauiSplashScreen Include="Resources\Splash\splash.svg"
Color="#00FFFFFF" />
<!-- β
Opaque color -->
<MauiSplashScreen Include="Resources\Splash\splash.svg"
Color="#512BD4" />β Confusing Color vs TintColor
Color= background fill behind the icon/splash.TintColor= recolors the foreground image itself.
Setting only TintColor without visible foreground paths results in a blank icon.
β οΈ SVG rendering issues at build time
Complex SVGs with gradients, filters, or masks may not rasterize correctly via the Microsoft.Maui.Resizetizer MSBuild task.
<!-- Workaround: supply a pre-made PNG and skip resizing -->
<MauiIcon Include="Resources\AppIcon\appicon.png"
Resize="false" />β οΈ BaseSize mismatch
If your SVG viewBox doesn't match the desired logical size, set BaseSize explicitly β otherwise the output dimensions may be wrong.
<!-- SVG viewBox is 100x100 but you want 456x456 logical output -->
<MauiIcon Include="Resources\AppIcon\appicon.svg"
BaseSize="456,456"
Color="#512BD4" />Best Practices
- Use SVG whenever possible β one file, infinite scaling, smaller repo.
- Set
BaseSizeexplicitly when the SVG viewBox doesn't match the desired logical size. - Keep splash images simple β large or complex SVGs slow the build and may render with artifacts.
- Test on real devices β emulator densities mask icon cropping, especially Android adaptive icon safe zones.
- Use composed icons for Android β
ForegroundFile+ForegroundScale="0.65"ensures the foreground stays within the safe zone.
Quick Troubleshooting
| Symptom | Likely fix |
|---|---|
| Icon appears blank or white | Check Color vs TintColor; ensure SVG paths exist |
| Splash shows default .NET logo | Verify MauiSplashScreen item is in the .csproj |
| Android icon looks clipped | Use composed icon with ForegroundScale="0.65" |
| Build error on SVG | Simplify SVG or switch to PNG with Resize="false" |
| Icon wrong size on one platform | Set BaseSize explicitly in the .csproj |
Checklist
-
MauiIconitem exists in.csprojwithColorset -
MauiSplashScreenitem exists in.csprojwithColorandBaseSize - Android: using composed icon with
ForegroundScalefor safe zone compliance - SVG sources are simple (no gradients/filters) or PNG fallback with
Resize="false" - Tested on a real device (not just emulator) for density and cropping