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
This how-to is targeted at **beginners** and makes no assumptions about your familiarity with Windows desktop development.
24
+
This how-to is targeted at **beginners** and makes no assumptions about your familiarity with Windows desktop development.
25
25
26
26
<!--todo: The source code for the app we're building in this how-to is available [on Github](https://github.com/microsoft/WindowsAppSDK-Samples).-->
27
27
28
28
## Prerequisites
29
29
30
-
-[Visual Studio 2022 and Tools for Windows App SDK](../windows-app-sdk/set-up-your-development-environment.md)
31
-
30
+
-[Visual Studio 2022 and Tools for Windows App SDK](../windows-app-sdk/set-up-your-development-environment.md)
32
31
33
32
## Create a new project using the WinUI 3 C# project template
34
33
@@ -102,7 +101,6 @@ Starting from the top and working our way down:
102
101
|`MainWindow.xaml.cs`| This code-behind file contains the business logic concerns associated with your app's main window. |
103
102
|`Package.appxmanifest`| This [package manifest file](/uwp/schemas/appxpackage/uapmanifestschema/generate-package-manifest) lets you configure publisher information, logos, processor architectures, and other details that determine how your app appears in the Windows Store. |
104
103
105
-
106
104
## Display "Hello world!"
107
105
108
106
To display "Hello world!" instead of the "Click me" button, navigate to `MainWindow.xaml`. You should see a `StackPanel` control's XAML markup:
@@ -152,7 +150,7 @@ If you restart your app, you should see a red `Hello world!`:
152
150
153
151
Add `this.Title = "Hello world!";` to your `MainWindow.xaml.cs` code-behind file:
154
152
155
-
```csharp
153
+
```csharp
156
154
publicMainWindow()
157
155
{
158
156
this.InitializeComponent();
@@ -166,7 +164,6 @@ If you restart your app, you should now see `Hello world!` in both the body and
166
164
167
165
Congratulations! You've built your first Windows App SDK / WinUI 3 app.
168
166
169
-
170
167
## Recap
171
168
172
169
Here's what you accomplished in this how-to:
@@ -179,7 +176,6 @@ Here's what you accomplished in this how-to:
179
176
6. You reviewed **reference docs** to better understand the **`StackPanel` control's properties**.
180
177
7. You updated your main window's **title bar**.
181
178
182
-
183
179
## Full code files
184
180
185
181
<!--todo: embed from github -->
@@ -290,7 +286,6 @@ namespace Hello_World
290
286
}
291
287
```
292
288
293
-
294
289
## FAQ
295
290
296
291
**Q: What does "packaged" mean?**
@@ -299,17 +294,17 @@ Windows apps can be delivered to end-users using a variety of application packag
299
294
300
295
**Q: Can I use VS Code to build WinUI 3 apps?**
301
296
302
-
Although technically possible, we strongly recommend using Visual Studio 2019 / 2022 to build desktop apps with WinUI 3 / Windows App SDK. See [the Windows developer FAQ](../get-started/windows-developer-faq.yml#do-i-need-to-use-visual-studio-to-build-winui-3-apps) for more information.
297
+
Although technically possible, we strongly recommend using Visual Studio 2019 / 2022 to build desktop apps with WinUI 3 / Windows App SDK. See [the Windows developer FAQ](../get-started/windows-developer-faq.yml#do-i-need-to-use-visual-studio-to-build-winui-3-apps) for more information.
303
298
304
299
**Q: Can I use C++ to build WinUI 3 apps?**
305
300
306
301
Yes! If you'd like to see this how-to updated with C++ guidance, [request an update on Github](https://github.com/MicrosoftDocs/windows-dev-docs/issues/new?title=Update%20request%3A%20How%20to%20build%20a%20hello%20world%20app&body=%28How%20can%20we%20help%3F%29&assignee=matchamatch) and we'll make it happen.
307
302
308
-
309
303
## Related
310
304
311
-
-[Sample applications for Windows development](../get-started/samples.md)
Copy file name to clipboardExpand all lines: hub/apps/how-tos/uno-multiplatform.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: How to target multiple platforms with your WinUI 3 app
3
3
description: Reach more users with a single WinUI 3 / .NET codebase using Uno Platform.
4
4
ms.topic: article
5
-
ms.date: 3/14/2023
5
+
ms.date: 3/31/2023
6
6
keywords: uno platform, winui
7
7
ms.author: aashcraft
8
8
author: alvinashcraft
@@ -14,7 +14,7 @@ content-type: how-to
14
14
15
15
# How to target multiple platforms with your WinUI 3 app
16
16
17
-
Once you've [created](/hub/apps/how-tos/hello-world-winui3.md) a starter Hello World WinUI 3 app, you might be wondering how to reach more users with a single codebase. This how-to will use [Uno Platform](https://platform.uno/) to expand the reach of your existing application enabling reuse of the business logic and UI layer across native mobile, web, and desktop.
17
+
Once you've [created](hello-world-winui3.md) a starter Hello World WinUI 3 app, you might be wondering how to reach more users with a single codebase. This how-to will use [Uno Platform](https://platform.uno/) to expand the reach of your existing application enabling reuse of the business logic and UI layer across native mobile, web, and desktop.
18
18
19
19
:::image type="content" source="images/hello-world/uno-hello-world.png" alt-text="The 'Hello world' app running in the browser.":::
20
20
@@ -89,7 +89,7 @@ A banner at the top of the editor may ask to reload projects, click **Reload pro
89
89
90
90
## Building your app
91
91
92
-
Now that you've generated the functional starting point of your multi-platform WinUI application, you can copy markup into it from the Hello World WinUI 3 project outlined in the [previous](/hub/apps/how-tos/hello-world-winui3.md) tutorial.
92
+
Now that you've generated the functional starting point of your multi-platform WinUI application, you can copy markup into it from the Hello World WinUI 3 project outlined in the [previous](hello-world-winui3.md) tutorial.
93
93
94
94
You should see the following default file structure in your Solution Explorer:
0 commit comments