locked
Standard dimensions for UWP Image assets? RRS feed

  • Question

  • User368387 posted

    I am currently working on a Xamarin app that handles Android, IOS and UWP. The app has assets that will be bundled within. I do know that: * For android, You need the assets inside the resources folder, with varians for ldpi, mdpi, hdpi, xhdpi, xxhpi and xxxhdpi. * For ios, You need the assets with @2x and @3x for different sizes. * For UWP, You had the suffix '.scale-xxx'.

    My question is, how many scales do people generally do in UWP to cover all dimensions? Is it ok to only have 1 without the 'scale-xxx' suffix or how many do i need?

    Sunday, October 6, 2019 5:14 PM

Answers

  • User382871 posted

    Is it ok to only have 1 without the 'scale-xxx' suffix or how many do i need? Adding the 'scale-xxx' suffix is to ensure these icons look sharp on every screen, you can create multiple versions of the same icon for different display scale factors. The scale factor determines the size of UI elements, such as text. Scale factors range from 100% to 400%. Larger values create larger UI elements, making them easier to see on high-DPI displays.

    Check the link: https://docs.microsoft.com/en-us/windows/uwp/design/style/app-icons-and-logos

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Monday, October 7, 2019 2:13 AM
  • User382871 posted

    Sure. But for Xamarin Forms in UWP, the images must in the root project directory (not in Assets) and build action set to Content.

    Check the sample, the image is placed in the application's root directory. https://docs.microsoft.com/zh-cn/samples/xamarin/xamarin-forms-samples/workingwithimages/

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Monday, October 7, 2019 7:07 AM

All replies

  • User382871 posted

    Is it ok to only have 1 without the 'scale-xxx' suffix or how many do i need? Adding the 'scale-xxx' suffix is to ensure these icons look sharp on every screen, you can create multiple versions of the same icon for different display scale factors. The scale factor determines the size of UI elements, such as text. Scale factors range from 100% to 400%. Larger values create larger UI elements, making them easier to see on high-DPI displays.

    Check the link: https://docs.microsoft.com/en-us/windows/uwp/design/style/app-icons-and-logos

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Monday, October 7, 2019 2:13 AM
  • User368387 posted

    Can this be used for other assets that are NOT app icons? I have some backgrounds and images in my page i'd like to format.

    Monday, October 7, 2019 4:53 AM
  • User382871 posted

    Sure. But for Xamarin Forms in UWP, the images must in the root project directory (not in Assets) and build action set to Content.

    Check the sample, the image is placed in the application's root directory. https://docs.microsoft.com/zh-cn/samples/xamarin/xamarin-forms-samples/workingwithimages/

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Monday, October 7, 2019 7:07 AM