How do I set the icon for my application?
Asked Answered
M

2

7

I am creating UWP application. I wanted to know from where I can set app icon image.

To be more precise: Where I should change my image for logo? The preview only shows the 24x24 image as shown below. What are the others sizes for?

Should I change the images for the logo in all dimensions?

enter image description here

AppxMainfest.Xaml

<?xml version="1.0" encoding="utf-8"?>
<Package ...>
  ...
  <Properties>
        <DisplayName>StockDispatchApp.UWP</DisplayName>
        <PublisherDisplayName>pci207</PublisherDisplayName>
        <Logo>Assets\StoreLogo.png</Logo>
    </Properties>
    <Dependencies>
        <TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.10240.0" MaxVersionTested="10.0.10586.0" />
    </Dependencies>
    <Resources>
        <Resource Language="EN-US" />
    </Resources>
    <Applications>
        <Application Id="App" Executable="StockDispatchApp.UWP.exe" EntryPoint="StockDispatchApp.UWP.App">
        <uap:VisualElements DisplayName="StockDispatchApp.UWP" Square150x150Logo="Assets\Square150x150Logo.png" Square44x44Logo="Assets\Square44x44Logo.png" Description="StockDispatchApp.UWP" BackgroundColor="transparent">
            <uap:LockScreen Notification="" BadgeLogo="Assets\96x96.png" />
            <uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png"></uap:DefaultTile>
            <uap:SplashScreen Image="Assets\SplashScreen.png" />
        </uap:VisualElements>
        </Application>
    </Applications>
    <Capabilities>
        <Capability Name="internetClient" />
    </Capabilities>
    ...
Meneses answered 14/9, 2016 at 5:38 Comment(1)
Upload all the required images. It will be helpful in case of different device size.Silo
T
4

The MSDN documentation provides clear description of where each of the images is used. In the bottom you can see Asset size tables tables which contain all the dimensions and their usage.

As for the Square 44x44 logo, the first five images in the first row are used for different scales in the app list.

The target images are used for app icons in different places around the system. In their unplated form, they should have transparent background. You can provide just the sizes recommended by the form, but you can also provide more sizes (see the documentation for the complete table).

Toastmaster answered 14/9, 2016 at 6:0 Comment(17)
i allready had gone through this link..but i dont get my ans from there.means do i need to set all the images as mensioned with there size?Meneses
or if i upload 1 image for logo and i will take all automatically..like IOS?Meneses
You don't need to provide all sizes. If you provide just one, it will be stretched when needed. But if you provide more sizes, it is better, because the image will be then crisp on all screen sizes.Toastmaster
so in short i need to upload all image sof different size in perticualr section.right?so all this are for olny app icon that wiil be disply in task bar.so badge and store logo are something diffrent?Meneses
Yes, each type of image is used for different purpose, so you should provide at least one image for each type (but you don't have to provide wide 310x150 logo if you don't need to have a wide tile, square 310x310 logo if you don't need a large tile and badge logo; these are optional)Toastmaster
" C00CE169: App manifest validation error: The app manifest must be valid as per schema: Line 26, Column 25, Reason: '' violates enumeration constraint of 'badge badgeAndTileText'. The attribute 'Notification' with value '' failed to parse. " I am Getting this error when i upload imagesMeneses
This happens when you upload images where? Could you post the relevant part of the Package.appxmanifest file?Toastmaster
this happens when i rebuild project after uploading imageMeneses
i uploaded appxmainfest file.even though i dont understand what is there.Meneses
I see the problem now - you have provided the Badge logo, but that is only allowed, when your app provides lock screen notifications. In case it does not, just delete the Badge Logo image from the appxmanifest. In case it does, you will have to specify the type of lock screen notifications on the Application tab of the appxmanifest - there is a drop down labeled "Lock screen notifications" which defaults to "(not set)", which is invalid when you do provide the Badge logo :-)Toastmaster
oh..you are genius..it solved my error.thanks a lot.. can you do little more help?Meneses
in task bar there it shows blue border around logo image..u knw why it is?Meneses
in article u shared above its says its is margin and it can not be modified..so any other solution?Meneses
If you provide the *_altform-unplated.png images, you should not be getting any additional margin around the images in the task bar :-) . You can still add your own background color, but on it's own, the system will leave the image as it is.Toastmaster
thnks a lotttttttttttttttMeneses
Hi..its not working. i have created unplated image of 44x44 for three scales.Meneses
You have to provide unplated the images in the sizes that are written there in the appxmanifest window - like 256x256, 48x48, 24x24, 16x16 :-) . If it does not work, send a screenshot of what is wrong :-)Toastmaster
Z
2

You don't need to worry about this, you can simply generate all the icons from Visual Studio 2017.

  • Go to App manifest and click on Visual Assets In all visual assets
  • There is option called Asset Generator, select at least a 400x400 px icon file size for the source field
  • And tap generate And here you get the all icons.

For reference please have a look at the attached screenshot.

enter image description here

Zelig answered 10/7, 2020 at 6:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.