Xamarin UWP项目适配全设备的图标尺寸咨询
Hey there! Let me walk you through exactly what icon sizes you need for your Xamarin.Forms UWP project to make sure it looks polished across phones, tablets, and desktop devices. UWP relies on scale-based asset naming, so you’ll need to prepare versions for 100%, 200%, and 400% scaling to cover all DPI scenarios (from low-res phones to high-DPI desktop monitors).
These are the icons that appear on the Start menu, taskbar, and as customizable app tiles. You’ll need to create these sizes for each tile type:
- Small Tile: 71x71px (100%), 142x142px (200%), 284x284px (400%)
- Name them like
Square71x71Logo.scale-100.png,Square71x71Logo.scale-200.png, etc., and drop them into your UWP project’sAssetsfolder.
- Name them like
- Medium Tile: 150x150px (100%), 300x300px (200%), 600x600px (400%)
- Filename format:
Square150x150Logo.scale-xxx.png
- Filename format:
- Wide Tile: 310x150px (100%), 620x300px (200%), 1240x600px (400%)
- Filename format:
Wide310x150Logo.scale-xxx.png
- Filename format:
- Large Tile: 310x310px (100%), 620x620px (200%), 1240x1240px (400%)
- Filename format:
Square310x310Logo.scale-xxx.png
- Filename format:
The splash screen displays while your app loads. Prepare these sizes to fit all device orientations and resolutions:
- 620x300px (100%), 1240x600px (200%), 2480x1200px (400%)
- Name them
SplashScreen.scale-100.png,SplashScreen.scale-200.png, etc. The UWP system will automatically adjust for portrait/landscape modes.
Don’t overlook these smaller icons that appear in system UI elements:
- App List/Taskbar Icon: 44x44px (100%), 88x88px (200%), 176x176px (400%)
- Filename:
Square44x44Logo.scale-xxx.png— this is what shows up in the Start menu’s list view and on the desktop taskbar.
- Filename:
- Notification Badge: 24x24px (100%), 48x48px (200%), 96x96px (400%)
- Filename:
BadgeLogo.scale-xxx.png— used for tiny notification badges in the action center.
- Filename:
- Use PNG format with transparent backgrounds where possible — UWP will automatically adapt the icon to light/dark system themes.
- Place all icons in the UWP project’s
Assetsfolder, then reference them via thePackage.appxmanifest(Visual Studio’s visual manifest editor makes this way easier than editing XML manually). - Xamarin.Forms doesn’t require any extra code for these icons — the UWP project handles all scaling and display logic based on the connected device.
内容的提问来源于stack exchange,提问作者Vijay457

