You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: hub/apps/get-started/best-practices.md
+24-24Lines changed: 24 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,14 +2,14 @@
2
2
title: Windows Application Development - Best Practices
3
3
description: A collection of best practices related to UI/UX, security, performance, and more.
4
4
ms.topic: best-practice
5
-
ms.date: 11/4/2025
5
+
ms.date: 12/22/2025
6
6
ms.localizationpriority: medium
7
7
ms.collection: windows11
8
8
---
9
9
10
10
# Windows application development - Best practices
11
11
12
-
The best practices in this document help you build great Windows apps that reach and delight about 1.5 billion diverse PC users around the world. This document is divided into the following sections:
12
+
The best practices in this article help you build great Windows apps that reach and delight about 1.5 billion diverse PC users around the world. This article is divided into the following sections:
13
13
14
14
1.**[User experience](#user-experience-ux)**: Guidance in this section helps you improve the look, feel, and usability of your apps.
15
15
1.**[Performance and fundamentals](#performance-and-fundamentals)**: Guidance in this section helps you improve your app's performance and resource utilization.
@@ -20,7 +20,7 @@ The best practices in this document help you build great Windows apps that reach
20
20
21
21
## User experience (UX)
22
22
23
-
Windows 11 offers a visual evolution of the Windows operating system that improves the look, feel, and usability of Windows. Our studies show that users have high expectations for Windows apps:
23
+
Windows 11 offers a visual evolution of the Windows operating system that improves the look, feel, and usability of Windows. Studies show that users have high expectations for Windows apps:
24
24
25
25
- They expect Windows apps to work with a complete range of inputs.
26
26
- They expect design and interaction patterns that look and feel native on current and future devices.
@@ -60,15 +60,15 @@ Use [on-object commanding](../design/controls/collection-commanding.md#creating-
60
60
61
61
#### Text interaction
62
62
63
-
Whenever there's text in an application, users expect that they can select and copy it. If the text is editable, they expect that they can cut and paste, as well. By providing consistent shortcuts to users, you let them complete their tasks more efficiently. Ensure that these actions can be performed using keyboard, mouse or trackpad, touch, and pen.
63
+
Whenever there's text in an application, users expect that they can select and copy it. If the text is editable, they expect that they can cut and paste, as well. By providing consistent shortcuts to users, you let them complete their tasks more efficiently. Ensure that users can perform these actions by using keyboard, mouse or trackpad, touch, and pen.
64
64
65
65
#### Panning and scrolling
66
66
67
-
It's uncommon for an application's UI to fit entirely inside a single page that doesn't need to scroll. Even if there are only a few UI elements, users can freely resize the app window and cause some UI elements to be hidden. Ensure that your application's UI properly supports scrolling and panning (using keyboard, mouse or trackpad, touch, and pen) to let users access any UI elements that might have moved out of the visible window area.
67
+
It's uncommon for an application's UI to fit entirely inside a single page that doesn't need to scroll. Even if there are only a few UI elements, users can freely resize the app window and cause some UI elements to be hidden. Ensure that your application's UI properly supports scrolling and panning (using keyboard, mouse or trackpad, touch, and pen) to let users access any UI elements that might move out of the visible window area.
68
68
69
69
### Visual style
70
70
71
-
Windows 11 is built on the [Windows 11 design principles](../design/signature-experiences/design-principles.md): Effortless, Calm, Personal, Familiar, and Complete + Coherent. We believe experiences that follow these principles bring great user experiences on Windows.
71
+
Windows 11 is built on the [Windows 11 design principles](../design/signature-experiences/design-principles.md): Effortless, Calm, Personal, Familiar, and Complete + Coherent. Experiences that follow these principles bring great user experiences on Windows.
72
72
73
73
#### Materials: Acrylic and Mica
74
74
@@ -84,7 +84,7 @@ For more information about Acrylic and Mica materials, see [Things you can do to
84
84
85
85
[Windows 11 geometry](../design/signature-experiences/geometry.md) supports modern app experiences. Progressively rounded corners, nested elements, and consistent gutters combine to create a soft, calm, and approachable effect that emphasizes unity of purpose and ease of use.
86
86
87
-
The visual and behavioral changes are built in to [WinUI 3](../winui/index.md). Use WinUI 3 where you can to take advantage of the work that has already been done. If you can't use WinUI 3, consider emulating the styles demonstrated in our[design toolkits](https://www.aka.ms/WinUI/3.0-figma-toolkit) and [WinUI Gallery](https://apps.microsoft.com/detail/9P3JFPWWDZRC).
87
+
The visual and behavioral changes are built in to [WinUI 3](../winui/index.md). Use WinUI 3 where you can to take advantage of the work that the Windows development team already did. If you can't use WinUI 3, consider emulating the styles demonstrated in the[design toolkits](https://www.aka.ms/WinUI/3.0-figma-toolkit) and [WinUI Gallery](https://apps.microsoft.com/detail/9P3JFPWWDZRC).
88
88
89
89
#### Context menu
90
90
@@ -98,17 +98,17 @@ For more information about iconography and typography on Windows, see [Things yo
98
98
99
99
### Window behavior and style
100
100
101
-
Applications run in a frame provided by Windows, and users expect the built-in Windows look and behaviors to be consistent across app windows. To ensure that your app looks and functions as users expect on Windows 11, consider supporting the features listed here.
101
+
Applications run in a frame that Windows provides. Users expect the built-in Windows look and behaviors to be consistent across app windows. To ensure that your app looks and functions as users expect on Windows 11, consider supporting the features listed here.
102
102
103
103
#### Snap Layout
104
104
105
-
Window snapping is greatly enhanced in Windows 11, and the Snap Layout menu is a new feature to help users discover and use the power of window snapping. Use the Snap Layout menu to test your app in different Snap Layouts and ensure your app supports different snap sizes, like 1/2, 1/3, and 1/4 screen.
105
+
Window snapping is greatly enhanced in Windows 11, and the Snap Layout menu is a new feature that helps users discover and use the power of window snapping. Use the Snap Layout menu to test your app in different Snap Layouts and ensure your app supports different snap sizes, like 1/2, 1/3, and 1/4 screen.
106
106
107
107
If the Snap Layout menu doesn't appear for your app by default, see [Support snap layouts for desktop apps on Windows 11](../desktop/modernize/ui/apply-snap-layout-menu.md) for some steps you can take to enable it.
108
108
109
109
#### Title bar and caption buttons
110
110
111
-
The title bar and caption buttons (minimize, maximize, close) are how users interact with Windows to resize, move, and close app windows. Having a consistent experience helps people use your application smoothly. See [Windows app title bar](../design/basics/titlebar-design.md) to learn about title bar and caption button design for Windows.
111
+
Users interact with the title bar and caption buttons (minimize, maximize, close) to resize, move, and close app windows. A consistent experience helps people use your application smoothly. See [Windows app title bar](../design/basics/titlebar-design.md) to learn about title bar and caption button design for Windows.
112
112
113
113
You can use the Windows App SDK APIs to [integrate app content with the title bar](../develop/title-bar.md) in WinUI 3, .NET, WinForms, and WPF apps.
114
114
@@ -152,7 +152,7 @@ Following the best practices in this section helps you meet your customers' expe
152
152
-[Improve power consumption and battery life by minimizing background work](../performance/power.md):
153
153
- Don't wake the CPU or use system resources while in the background.
154
154
155
-
-[Improve the responsiveness of your app's launch and key interactions](../performance/responsive.md)
155
+
-[Improve the responsiveness of your app's launch and key interactions](../performance/responsive.md):
156
156
- Define your key interaction scenarios and add ETW events to measure.
157
157
- Set goals based on the interaction class associated with user expectations.
158
158
@@ -172,7 +172,7 @@ To make your app run best in an enterprise environment, add support for MSIX app
172
172
173
173
Windows can run on Arm devices. Arm PCs benefit from extended battery life and integrated support for mobile data networks. These PCs also provide great application compatibility and allow you to run your existing `x86` and `x64` applications unmodified.
174
174
175
-
For best performance, enable your apps to take full advantage of the energy-efficient Arm processor architecture by either building a full Arm version or by optimizing the parts of the codebase that would benefit most from native performance. For more information on these techniques, see [Windows on Arm](/windows/uwp/porting/apps-on-arm) and [Arm64EC for Windows 11 apps on Arm](/windows/uwp/porting/arm64ec).
175
+
For best performance, enable your apps to take full advantage of the energy-efficient Arm processor architecture by either building a full Arm version or by optimizing the parts of the codebase that benefit most from native performance. For more information on these techniques, see [Windows on Arm](/windows/uwp/porting/apps-on-arm) and [Arm64EC for Windows 11 apps on Arm](/windows/uwp/porting/arm64ec).
176
176
177
177
### Push notifications
178
178
@@ -193,7 +193,7 @@ Reliable installation, update, and uninstallation experiences are important part
193
193
### Application discovery
194
194
195
195
- Listing your app on the [Microsoft Store](https://blogs.windows.com/windowsexperience/2021/06/24/building-a-new-open-microsoft-store-on-windows-11/) makes your app more discoverable for users.
196
-
- If you host your app across multiple channels (for example, on a website and on the Microsoft Store), your application should have a consistent application identity and update mechanism across all channels.
196
+
- If you host your app across multiple channels (for example, on a website and on the Microsoft Store), use a consistent application identity and update mechanism across all channels.
197
197
-[Distribute your app through the Microsoft Store](../desktop/modernize/desktop-to-uwp-distribute.md) to make it more discoverable for users. Note that Windows users access Store apps through the Windows Package Manager [WinGet](../../package-manager/winget/index.md). If you don't publish to the Microsoft Store, you can still make your app easily discoverable in WinGet via the [WinGet repository](../../package-manager/package/index.md).
198
198
199
199
<!--todo: unpackaged app distribution best practices -->
@@ -225,19 +225,19 @@ Reliable installation, update, and uninstallation experiences are important part
225
225
226
226
## Accessibility
227
227
228
-
Accessible Windows applications support rich and [inclusive experiences](https://www.microsoft.com/design/inclusive/) for as many people as possible, including those with disabilities (both temporary and permanent), personal preferences, specific work styles, or situational constraints (such as shared work spaces, driving, cooking, glare, and so on).
228
+
Accessible Windows applications support rich and [inclusive experiences](https://www.microsoft.com/design/inclusive/) for as many people as possible. This inclusivity extends to people with disabilities (both temporary and permanent), personal preferences, specific work styles, or situational constraints (such as shared work spaces, driving, cooking, glare, and so on).
229
229
230
230
In fact, the [World Health Organization](https://www.who.int/news-room/fact-sheets/detail/disability-and-health) defines disability not as a personal characteristic, but rather as a mismatched interaction between a person and the physical and digital world around them.
231
231
232
232
> ### Accessibility is good for both people and business
233
233
>
234
234
> **Accessibility is a responsibility**
235
235
>
236
-
> More than 1 billion people worldwide experience some form of disability. However, only one in 10 have access to the assistive technology needed to fully participate in our economies and societies. Typically, the unemployment rate for people with disabilities is twice that of people without a disability. And disabilities—whether situational, temporary, or permanent—can affect any of us at any time.
236
+
> More than 1 billion people worldwide experience some form of disability. However, only one in 10 have access to the assistive technology needed to fully participate in our economies and societies. Typically, the unemployment rate for people with disabilities is twice that of people without a disability. And disabilities - whether situational, temporary, or permanent - can affect any of us at any time.
237
237
>
238
238
> **Accessibility is an opportunity**
239
239
>
240
-
> According to the [Microsoft Accessibility Approach Datasheet](https://query.prod.cms.rt.microsoft.com/cms/api/am/binary/RE4wNu4): Inclusive organizations that embrace best practices for employing and supporting persons with disabilities in the workplace outperform their peers and do better at attracting and keeping top talent. Millennials, who will be 75% of the global workforce by 2020, typically choose employers who reflect their values. Diversity and inclusion top that list.
240
+
> According to the [Microsoft Accessibility Approach Datasheet](https://query.prod.cms.rt.microsoft.com/cms/api/am/binary/RE4wNu4): Inclusive organizations that embrace best practices for employing and supporting persons with disabilities in the workplace outperform their peers and do better at attracting and keeping top talent. Millennials, who are 75% of the global workforce, typically choose employers who reflect their values. Diversity and inclusion top that list.
241
241
242
242
### Incorporating accessibility
243
243
@@ -247,9 +247,9 @@ For detailed guidance on building accessible Windows apps, see [Accessibility in
247
247
248
248
### Accessibility testing
249
249
250
-
**Accessibility Insights** is a powerful suite of tools for developers to test the accessibility of their apps and services. Here are some tools to leverage in testing accessibility:
250
+
**Accessibility Insights** is a powerful suite of tools for developers to test the accessibility of their apps and services. Use the following tools to test accessibility:
251
251
252
-
1.[Inspect in Accessibility Insights for Windows](https://accessibilityinsights.io/docs/windows/getstarted/inspect/). Inspect the accessibility tree to find low-hanging fruit like hints in labels, incorrect roles, and other issues.
252
+
1.[Inspect in Accessibility Insights for Windows](https://accessibilityinsights.io/docs/windows/getstarted/inspect/). Inspect the accessibility tree to find low-hanging fruit like hints in labels, incorrect roles, and other problems.
253
253
1.[Event monitoring in Accessibility Insights for Windows · Accessibility Insights](https://accessibilityinsights.io/docs/en/windows/getstarted/eventmonitoring/). See [Supporting UI Automation Control Types](/windows/win32/winauto/uiauto-supportinguiautocontroltypes) for more info on event monitoring.
254
254
1. Run Accessibility Insights automated checks in your PRs or CI/CD. For more info, see [axe-pipelines-samples](https://github.com/microsoft/axe-pipelines-samples).
255
255
1. Fix all bugs you find, as they all have a direct impact on accessibility.
@@ -263,7 +263,7 @@ An insecure application can be an entry point that allows an attacker to perform
263
263
- Follow the [Security Development Lifecycle](https://www.microsoft.com/securityengineering/sdl/) for all development.
264
264
- Threat modeling can help you avoid security flaws.
265
265
- Using secure libraries, languages, and tools minimizes implementation flaws.
266
-
- Secure defaults can prevent security issues caused by user error.
266
+
- Secure defaults can prevent security problems caused by user error.
267
267
- Don't require administrative privileges to _install_ your app.
268
268
- Ideally, your app should support both administrative installs and per-user installs.
269
269
- Using [MSIX packaging](/windows/msix/packaging-tool/tool-overview) is one way to achieve this goal.
@@ -283,15 +283,15 @@ Most modern apps collect and use a large amount of data – including personal d
283
283
284
284
### Privacy guidelines
285
285
286
-
- Ensure that your app provides an accurate Privacy Policy. Ideally, provide both a summary document written for a casual audience (your users) in addition to a long-form legal policy (written for your lawyers).
287
-
- Familiarize yourself with privacy regulations in the markets where your app is available, and ensure your app meets or exceeds any requirements for disclosure, usage rights, deletion requests, and other privacy concerns.
286
+
- Ensure that your app provides an accurate Privacy Policy. Ideally, provide both a summary document written for a casual audience (your users) and a long-form legal policy (written for your lawyers).
287
+
- Familiarize yourself with privacy regulations in the markets where your app is available. Ensure your app meets or exceeds any requirements for disclosure, usage rights, deletion requests, and other privacy concerns.
288
288
- Collect the least amount of personal data needed to complete your app's experiences.
289
-
- Don't collect data "just in case" – there should be a valid reason for collecting all data, such as to improve the customer's experience or to facilitate monetization.
289
+
- Don't collect data "just in case." Have a valid reason for collecting all data, such as to improve the customer's experience or to facilitate monetization.
290
290
- Always get the user's consent before collecting and storing personal data. Provide the user with an easy way to revert their decision in the future. Avoid "[dark patterns](https://www.reuters.com/legal/legalindustry/dark-patterns-new-frontier-privacy-regulation-2021-07-29/#:~:text=Some%20examples%20of%20dark%20pattern%20usage%20include)" such as making the "Yes" button larger or more prominent than the "No" button in a consent dialog.
291
-
- Consult with applicable regulations to determine what specific disclosures and consent is required for specified kinds of data. For example, some regions may allow users to view, change, or delete the data you have stored about them.
291
+
- Consult with applicable regulations to determine what specific disclosures and consent are required for specified kinds of data. For example, some regions may allow users to view, change, or delete the data you have stored about them.
292
292
- If you must transmit data over the network, always use secured connections, such as connections over TLS.
293
293
- Avoid storing personal data in a centralized location, such as a website. If you must store personal data, minimize the amount of data you store, store it only for as long as strictly necessary, and ensure it is securely encrypted.
294
-
- Verify that any third-party libraries or SDKs you use also have good privacy practices. Note this concern isn't limited to just advertising SDKs – any library that connects to the internet might impact the privacy of your app's users.
294
+
- Verify that any third-party libraries or SDKs you use also have good privacy practices. This concern isn't limited to just advertising SDKs – any library that connects to the internet might impact the privacy of your app's users.
0 commit comments