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/samples.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: Samples and tools for Windows development
3
3
description: Use these GitHub repositories to learn about Windows development. Sample apps demonstrate Windows features, API usage patterns, and end-to-end scenarios.
4
4
ms.topic: how-to
5
-
ms.date: 03/10/2025
5
+
ms.date: 11/4/2025
6
6
keywords: windows, win32, desktop development
7
7
ms.localizationpriority: medium
8
8
ms.collection: windows11
@@ -17,7 +17,7 @@ This page contains links to resources that can make you more efficient as you de
17
17
18
18
:::image type="content" source="./images/WASDK.png" alt-text="Header image for Windows App SDK" border="false":::
19
19
20
-
The [**WindowsAppSDK-Samples repository**](https://github.com/microsoft/WindowsAppSDK-Samples) provides a collection of code samples that demonstrate how to use the Windows App SDK to build modern Windows applications. These samples cover key features such as WinUI 3, App Lifecycle, Windowing, and Push Notifications, offering practical, hands-on guidance for developers. Whether you're new to the Windows App SDK or looking for specific implementation details, this repository serves as a valuable resource to accelerate development and explore best practices. Other samples can be found in our [Samples Browser](/samples/browse/).
20
+
The [**WindowsAppSDK-Samples repository**](https://github.com/microsoft/WindowsAppSDK-Samples) provides a collection of code samples that demonstrate how to use the Windows App SDK to build modern Windows applications. These samples cover key features such as WinUI 3, app lifecycle, windowing, and push notifications, offering practical, hands-on guidance for developers. Whether you're new to the Windows App SDK or looking for specific implementation details, this repository serves as a valuable resource to accelerate development and explore best practices. You can find other samples in our [Samples Browser](/samples/browse/).
21
21
22
22
23
23
> [!div class="nextstepaction"]
@@ -50,7 +50,7 @@ You can get the [**Windows Community Toolkit Gallery app from the Microsoft Sto
50
50
51
51
This training module steps through how to set up your developer environment and use WinUI, the Windows App SDK, and the Windows Community ToolKit to build a Windows app called SnowPal.
52
52
53
-
SnowPal is a word game in which the app selects a word for the user to guess and presents that word as a series of blank spaces, with each blank space representing a letter from the word in spelling order. The player takes turns guessing a single letter that they believe is in the word. If the letter is not in the word, a missing piece of the SnowPal character is added; otherwise, the letter replaces the corresponding blank(s) in the word. The player wins by guessing the word or loses when all pieces of the SnowPal character have been added.
53
+
SnowPal is a word game in which the app selects a word for the user to guess and presents that word as a series of blank spaces, with each blank space representing a letter from the word in spelling order. The player takes turns guessing a single letter that they believe is in the word. If the letter isn't in the word, a missing piece of the SnowPal character is added; otherwise, the letter replaces the corresponding blanks in the word. The player wins by guessing the word or loses when all pieces of the SnowPal character are added.
54
54
55
55
By building this app step by step, you gain hands-on experience with core development concepts while creating something fun and functional.
Copy file name to clipboardExpand all lines: hub/apps/get-started/start-here.md
+25-25Lines changed: 25 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,43 +2,43 @@
2
2
title: Get started with Windows development using WinUI
3
3
description: List of steps to get started developing Windows apps with WinUI and the Windows App SDK.
4
4
ms.topic: how-to
5
-
ms.date: 04/18/2025
5
+
ms.date: 11/4/2025
6
6
keywords: windows, desktop development
7
7
ms.localizationpriority: medium
8
8
ms.collection: windows11
9
9
---
10
10
11
11
# Start developing Windows apps
12
12
13
-
Welcome to Windows app development. This guide will take you through the steps needed to begin creating apps using the latest Windows development frameworks: the Windows App SDK and WinUI. It will also point you to resources that will help you learn more about Windows development. If you want a step-by-step guide to setting up your developer environment and building your first WinUI app with the latest tools, please see [WinUI 101](/training/modules/winui-101/). If you are already comfortable developing apps for Windows, but want to know more about the latest tools, please see [Develop Windows desktop apps](/windows/apps/develop/).
13
+
Welcome to Windows app development. This guide takes you through the steps needed to begin creating apps by using the latest Windows development frameworks: the Windows App SDK and WinUI. It also points you to resources that help you learn more about Windows development. For a step-by-step guide to setting up your developer environment and building your first WinUI app with the latest tools, see [WinUI 101](/training/modules/winui-101/). If you're already comfortable developing apps for Windows but want to know more about the latest tools, see [Develop Windows desktop apps](/windows/apps/develop/).
14
14
15
15
> [!TIP]
16
16
> [Microsoft Copilot](https://copilot.microsoft.com) is a great resource if you have questions about getting started writing Windows apps.
17
17
18
18
19
19
## 1. Enable Developer Mode
20
20
21
-
Windows has a special mode for developers that adjusts security settings in order to let you run the apps you're working on. You'll need to enable Developer Mode before you can build, deploy, and test your app using Visual Studio.
21
+
Windows has a special mode for developers that adjusts security settings so you can run the apps you're working on. You need to enable Developer Mode before you can build, deploy, and test your app by using Visual Studio.
22
22
23
23
> [!TIP]
24
-
> If you don't enable it now, you'll be prompted to enable it when you try to build your app in Visual Studio.
24
+
> If you don't enable Developer Mode now, Visual Studio prompts you to enable it when you try to build your app.
25
25
26
26
To enable Developer Mode:
27
27
28
-
* Open Windows Settings and navigate to the **[System > For developers](ms-settings:developers)** page.
28
+
* Open Windows Settings and go to the **[System > For developers](ms-settings:developers)** page.
29
29
* Toggle the Developer Mode switch to **On** and confirm your choice in the confirmation dialog.
30
30
31
31
For more information about Developer Mode, see [Enable your device for development](/windows/apps/get-started/enable-your-device-for-development).
32
32
33
33
34
34
## 2. Install Visual Studio
35
35
36
-
You'll use [Visual Studio](/visualstudio/ide/), Microsoft's comprehensive integrated development environment (IDE), to create your WinUI app. It's the preferred development tool of many Windows developers and it will help you write, debug, and deploy your apps. The project templates in Visual Studio will quickly get you started with projects for Windows and many other platforms.
36
+
Use [Visual Studio](/visualstudio/ide/), Microsoft's comprehensive integrated development environment (IDE), to create your WinUI app. It's the preferred development tool of many Windows developers and it helps you write, debug, and deploy your apps. The project templates in Visual Studio quickly get you started with projects for Windows and many other platforms.
37
37
38
38
> [!TIP]
39
39
> Before installing these tools, make sure your development computer meets the [system requirements for Windows app development](../windows-app-sdk/system-requirements.md).
40
40
41
-
Use the link below to download and install the latest Visual Studio. The installer will walk you through the steps, but if you find you need detailed instructions, see [Install Visual Studio](/visualstudio/install/install-visual-studio).
41
+
Use the following link to download and install the latest Visual Studio. The installer walks you through the steps, but if you need detailed instructions, see [Install Visual Studio](/visualstudio/install/install-visual-studio).
@@ -47,7 +47,7 @@ The free Visual Studio Community Edition includes everything you need to create
47
47
48
48
### 2.2 Required workloads and components
49
49
50
-
While installing Visual Studio, you need to install the workloads and components required for developing with WinUI and the Windows App SDK. After installation, you can open the Visual Studio Installer app and select **Modify** to add workloads and components.
50
+
While installing Visual Studio, install the workloads and components required for developing with WinUI and the Windows App SDK. After installation, you can open the Visual Studio Installer app and select **Modify** to add workloads and components.
51
51
52
52
On the **Workloads** tab of the Visual Studio Installer app, select the following workloads and components:
53
53
@@ -58,7 +58,7 @@ On the **Workloads** tab of the Visual Studio Installer app, select the followin
58
58
:::image type="content" source="images/hello-world/vs-workload-winui.png" alt-text="A screenshot of the Visual Studio installer UI with the WinUI application development workload selected.":::
59
59
60
60
* For **C++** app development using the Windows App SDK, select **WinUI application development**.
61
-
* Then in the **Installation details** pane, under the **WinUI application development** node, select **C++ WinUI app development tools**. (This will also select any additional required components.)
61
+
* Then in the **Installation details** pane, under the **WinUI application development** node, select **C++ WinUI app development tools**. (This selection also includes any additional required components.)
62
62
63
63
:::image type="content" source="images/hello-world/vs-workload-winui-cpp.png" alt-text="A screenshot of the Visual Studio installer UI with the C++ WinUI app development tools selected.":::
64
64
@@ -71,38 +71,38 @@ On the **Workloads** tab of the Visual Studio Installer app, select the followin
71
71
* Then in the **Installation details** pane of the installation dialog box, select **Windows App SDK C# Templates** (near the bottom of the list).
72
72
* For **C++** app development using the Windows App SDK, select **Desktop development with C++**
73
73
* Then in the **Installation details** pane of the installation dialog box, select **Windows App SDK C++ Templates** (at the bottom of the list).
74
-
* On the **Individual components** tab of the installation dialog box, in the **SDKs, libraries, and frameworks** section, make sure the latest Windows SDK is selected. It will look like **Windows 11 SDK (10.0.22621.0)**. Type "Windows SDK" into the search box to make it easier to find.
74
+
* On the **Individual components** tab of the installation dialog box, in the **SDKs, libraries, and frameworks** section, make sure the latest Windows SDK is selected. It looks like **Windows 11 SDK (10.0.22621.0)**. Type "Windows SDK" into the search box to make it easier to find.
75
75
76
76
---
77
77
78
78
## 3. Create and launch your first WinUI app
79
79
80
-
Visual Studio project templates include all the files you need to quickly create your app. In fact, after you create your project from a WinUI app template, you'll already have an app that you can run, and then add your code to.
80
+
Visual Studio project templates include all the files you need to quickly create your app. In fact, after you create your project from a WinUI app template, you already have an app that you can run, and then add your code to.
81
81
82
-
To create a new project using the WinUI C# Blank App project template:
82
+
To create a new project by using the WinUI C# Blank App project template:
83
83
84
84
1. Open Visual Studio and select **Create a new project** from the launch page. (If Visual Studio is already open to the editor, select **File** > **New** > **Project**):
85
85
:::image type="content" source="images/hello-world/start-project.png" alt-text="Create a new project":::
86
86
87
-
1. Search for `WinUI` and select the `WinUI Blank App (Packaged)` C# project template, then click**Next**:
87
+
1. Search for `WinUI` and select the `WinUI Blank App (Packaged)` C# project template, then select**Next**:
1. Specify a project name, then click**Create**. You can optionally specify a solution name and directory, or leave the defaults. In this image, the `Hello World` project belongs to a `Hello World` solution, which will live in `C:\Projects\`:
90
+
1. Specify a project name, then select**Create**. You can optionally specify a solution name and directory, or leave the defaults. In this image, the `Hello World` project belongs to a `Hello World` solution, which lives in `C:\Projects\`:
> If you want to use this project to build the complete app in the Next steps section, name the project `WinUINotes`.
95
95
96
-
1.Click the Debug "Start" button to build and run your project:<br/>
96
+
1.Select the **Debug** "Start" button to build and run your project:<br/>
97
97
:::image type="content" source="images/hello-world/start-click.png" alt-text="Build and run your project":::<br/>
98
-
Your project will build, be deployed to your local machine, and run in debug mode:<br/>
98
+
Your project builds, deploys to your local machine, and runs in debug mode:<br/>
99
99
:::image type="content" source="images/hello-world/click-me.png" alt-text="Hello World project built and running":::
100
100
101
-
1. To stop debugging, close the app window, or click the debug "Stop" button in Visual Studio.
101
+
1. To stop debugging, close the app window, or select the debug "Stop" button in Visual Studio.
102
102
103
103
## 4. Delete sample code
104
104
105
-
The `MainWindow` class included with the project template includes some sample code that needs to be removed to make room for your content.
105
+
The `MainWindow` class included with the project template contains sample code that you need to remove to make room for your content.
106
106
107
107
1. Double-click `MainWindow.xaml` in **Solution Explorer** to open it. You should see XAML markup for a `StackPanel` control.
108
108
1. Delete the XAML for the `StackPanel`. (You'll add your own content in its place as you create your app.)
@@ -114,7 +114,7 @@ The `MainWindow` class included with the project template includes some sample c
114
114
</StackPanel>
115
115
```
116
116
117
-
If you try to run your app now, Visual Studio will throw an error along the lines of `The name 'myButton' does not exist in the current context`. This is because you deleted the `Button` control named `myButton`, but it's still referenced in the `MainPage.xaml.cs` code-behind file. Delete the reference in the code file, too.
117
+
If you try to run your app now, Visual Studio throws an error along the lines of `The name 'myButton' does not exist in the current context`. This error occurs because you deleted the `Button` control named `myButton`, but the `MainPage.xaml.cs` code-behind file still references it. Delete the reference in the code file, too.
118
118
119
119
1. Double-click `MainWindow.xaml.cs` in **Solution Explorer** to open it.
120
120
1. Delete the `myButton_Click` event handler.
@@ -136,28 +136,28 @@ The `MainWindow` class included with the project template includes some sample c
136
136
}
137
137
```
138
138
139
-
1. Save the file by pressing <kbd>CTRL + SHIFT + S</kbd>, clicking the Save All icon in the tool bar, or by selecting the menu **File** > **Save All**.
139
+
1. Save the file by pressing <kbd>CTRL + SHIFT + S</kbd>, clicking the **Save All** icon in the tool bar, or by selecting the menu **File** > **Save All**.
140
140
141
141
## 5. Update to the latest WinUI/Windows App SDK
142
142
143
-
The Windows App SDK (and WinUI, which is part of it) is distributed as a [NuGet](/nuget/what-is-nuget) package. This means updates can be released out-of-sync with Windows and Visual Studio. As a result, the Visual Studio template you used to create your project might not reference the latest Windows App SDK NuGet package. To ensure you have the latest features and fixes, you should update your NuGet packages every time you create a new project in Visual Studio.
143
+
The Windows App SDK (and WinUI, which is part of it) is distributed as a [NuGet](/nuget/what-is-nuget) package. This distribution method means updates can be released out-of-sync with Windows and Visual Studio. As a result, the Visual Studio template you used to create your project might not reference the latest Windows App SDK NuGet package. To ensure you have the latest features and fixes, update your NuGet packages every time you create a new project in Visual Studio.
144
144
145
145
To update the Windows App SDK NuGet package for your project:
146
146
147
147
* In Visual Studio, with your project loaded, select **Tools** > **NuGet Package Manager** > **Manage NuGet Packages for Solution...**.
148
-
* If an update is available, it will appear on the Updates page. Check the box next to the listed update. (To include prerelease updates, check the "Include prerelease" option. To learn more about what's included in an update, see the [release notes](../windows-app-sdk/stable-channel.md).)
149
-
* Click the **Update** button, then click **Apply** in the Preview changes dialog, then accept the license terms to finish installing the update.
148
+
* If an update is available, it appears on the **Updates** page. Check the box next to the listed update. (To include prerelease updates, check the **Include prerelease** option. To learn more about what's included in an update, see the [release notes](../windows-app-sdk/stable-channel.md).)
149
+
* Select **Update**, then select **Apply** in the **Preview changes** dialog. Accept the license terms to finish installing the update.
150
150
151
151
:::image type="content" source="images/hello-world/nuget-update.png" alt-text="A screenshot of the NuGet package manager in Visual Studio showing a Windows App SDK package update.":::
152
152
153
-
Now your project is using the latest WinUI features that are available, and it's ready for you to make it your own.
153
+
Now your project uses the latest WinUI features, and it's ready for you to make it your own.
154
154
155
155
## Next steps
156
156
157
157
> [!div class="nextstepaction"]
158
158
> [Complete a tutorial to create a note app with WinUI](../tutorials/winui-notes/intro.md)
159
159
160
-
* To get an idea of what WinUI has to offer, check out the WinUI Gallery app.
160
+
* To get an idea of what WinUI offers, check out the WinUI Gallery app.
0 commit comments