Mokymas
Modulis
How to build the User Interface in a canvas app in Power Apps - Training
In this module, learners will learn how to build UI for their app including theming, icons, images, personalization, form factors, and controls.
Ši naršyklė nebepalaikoma.
Atnaujinkite į „Microsoft Edge“, kad pasinaudotumėte naujausiomis funkcijomis, saugos naujinimais ir techniniu palaikymu.
PWAs that are installed on Windows can be customized in the way they appear in the operating system (OS). A PWA can define a set of icons and a theme color for the title bar.
In Windows, apps are recognizable to users by their icons. Icons appear in the Taskbar, in the Start Menu, and in other places such as system settings.
A PWA can configure which image files the operating system should use to display an icon in these various places. Multiple images can be provided for the OS to choose, depending on the context.
In the web app manifest file, app icons are defined with the icons
member:
{
"icons": [
{
"src": "/icons/icon-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/icons/icon-256x256.png",
"sizes": "256x256",
"type": "image/png"
},
{
"src": "/icons/icon-384x384.png",
"sizes": "384x384",
"type": "image/png"
},
{
"src": "/icons/icon-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
]
}
Each icon in the icons
array should come with at least the src
and sizes
properties. An icon can also have the type
and purpose
properties.
Property | Description |
---|---|
src |
The path to the image file, which can be a relative path from the app root folder, or an absolute URL. |
sizes |
A space-separated list of sizes that the corresponding image can be used for. |
type |
An optional hint for the OS to quickly detect the image type. |
purpose |
An optional hint to help the OS choose the right icon image, depending on the context. The value can be monochrome , maskable , or any . |
Learn more about the icons member.
Your PWA can be enhanced on Windows by supplying the images with specific dimensions in your web app manifest. We recommend choosing one of the options below:
Level 1: (Basic image support: 512x512) This is the base image from which to generate missing images.
Level 2: (Tiles) At this level, your web app manifest contains tile images for the default (1x) display scale. Each of the images must be in PNG format and have the any
purpose set. Here is a list of recommended images and sizes.
Level 3: (Tiles with display scales) At this level, your web app manifest should contain tile images for all Windows display scale sizes. Display scale is a user-configuration in Windows (users can change it by going to Settings > Display > Scale). Your web app manifest icons should include images with these dimensions:
Level 4 (Tiles, display scales, and target sizes) At this level you supply images for tiles with display scales and target size images for display in various surfaces in Windows, including taskbar, start menu, task manager, ALT+Tab task switcher, and more. This provides the best experience for your users, but also requires the most developer effort. Your web app manifest icons should include images with these dimensions:
Consider, for example, how your app icon might show different content depending on the available surface area:
Notice how the content of the icon changed. This is possible only through the use of higher levels of icon support. We recommend developers choose higher levels to give the best experience for your Windows users.
Below you'll find a description of each app icon and where they show up in Windows.
The normal app icon that's shown in the start menu, task bar, or task manager.
The small tile is shown in the start menu when the user set your app's tile to small size.
The medium tile icon is shown in the start menu when the user sets your app's tile to medium size.
The wide tile icon is shown in the start menu when the user sets your app's tile to wide size.
The large tile icon is in the start menu when the user sets your app's tile to large size.
The store logo icon is shown in app installer, Windows Partner Center, the "Report an app" option in the Store, and the "Write a review" option in the Store.
The splash screen asset is shown as the splash screen for your app. Currently supported only in classic package. In the future, we may add support for the modern hosted app package as well.
In addition to the standard scale factor sizes described above, we also recommend creating "target-size" assets. We call these assets target-size because they target specific sizes, such as 16 pixels, rather than specific scale factors, such as 400. Target-size assets are for Windows surfaces that don't use the scaling plateau system.
For example, the Apps & features Windows setting uses app icons with specific sizes
On Windows, PWAs have their own application window, with a title bar that contains the name of the app and the system close, maximize, and minimize icons.
The web content created by the PWA fills the entire surface area of the window, except for the title bar area, which can be customized with a theme color.
The following image shows what a PWA's title bar looks like when not using a theme color, and when using a theme color that matches the main color of the app:
To define a theme color, use the theme_color
web app manifest member:
{
"theme_color": "#0d4c73"
}
Individual web pages can also define a theme color, by using the theme-color
meta tag. When this meta tag is present on the page, its defined color overrides the color that's found in the web app manifest.
You can display your app content in the title bar area, by using the Window Controls Overlay feature. See Display content in the title bar area using Window Controls Overlay.
Mokymas
Modulis
How to build the User Interface in a canvas app in Power Apps - Training
In this module, learners will learn how to build UI for their app including theming, icons, images, personalization, form factors, and controls.