Skip to content

Commit 2d6372e

Browse files
authored
Stwhi main/wpf topic (#3568)
* new WPF tpoic * renumbering * renumbering 2 * last of the edits * relocating and updating TOC * moving again * clarifying editing * fixing build issue * installing the runtime * new section about packaged apps * various other additions and improvements * review feedback * fixing links * fixing links 2
1 parent 841c9d3 commit 2d6372e

File tree

5 files changed

+192
-21
lines changed

5 files changed

+192
-21
lines changed
Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
description: Learn how to add modern experiences for Windows users in a desktop application that you have packaged in a Windows app package.
2+
description: Learn how to add modern experiences for Windows users in a desktop app that you have packaged in a Windows app package.
33
title: Modernize packaged desktop apps
4-
ms.date: 04/22/2019
4+
ms.date: 05/11/2023
55
ms.topic: article
66
keywords: windows 10, uwp
77
ms.localizationpriority: medium
@@ -10,30 +10,36 @@ ms.custom: RS5
1010

1111
# Features that require package identity
1212

13-
Some [modern Windows experiences](index.md) are available only to desktop apps that have [package identity](/uwp/schemas/appxpackage/uapmanifestschema/element-identity) at runtime. These features include certain Windows Runtime APIs, package extensions, and UWP components.
13+
Some [modern Windows experiences](./index.md) require your app to have [package identity](/uwp/schemas/appxpackage/uapmanifestschema/element-identity) at runtime (in other words, your app needs to be *packaged*). Those experiences include certain Windows features, certain Windows Runtime APIs, package extensions, and UWP components.
1414

15-
Only packaged apps have package identity at runtime. For definitions of apps that are packaged, unpackaged, and packaged with external location, see [Deployment overview](../../package-and-deploy/index.md). If your desktop app has package identity, then you can use the following features in your app.
15+
Universal Windows Platform (UWP) apps receive package identity by default because they can be distributed only via MSIX packages. Other types of Windows apps, including WPF apps, can also be deployed via MSIX packages to obtain package identity. But apps *packaged with external location* also has package identity. For more info about these terms, see [Advantages and disadvantages of packaging your app](/windows/apps/package-and-deploy/).
16+
17+
Only packaged apps (including apps packaged with external location) have package identity at runtime. If your app has package identity, then you can use the following features in your app.
18+
19+
## Notifications
20+
21+
The Windows App SDK [notifications APIs](/windows/windows-app-sdk/api/winrt/microsoft.windows.appnotifications.appnotificationmanager) require your app to have package identity.
1622

1723
## Integrate with package extensions
1824

19-
If your application needs to integrate with the system (For example: establish firewall rules), describe those things in the package manifest of your application and the system will do the rest. For most of these tasks, you won't have to write any code at all. With a bit of XML in the manifest, you can do things like start a process when the user logs on, integrate your application into File Explorer, and add your application a list of print targets that appear in other apps.
25+
If your app needs to integrate with the system (for example, establish firewall rules), then describe those things in the package manifest of your appm and the system will do the rest. For most of these tasks, you won't have to write any code at all. With a bit of XML in the manifest, you can do things such as: start a process when the user logs on; integrate your app into File Explorer; and add your app a list of print targets that appear in other apps.
2026

21-
For more information, see [Integrate your desktop app with package extensions](desktop-to-uwp-extensions.md).
27+
For more info, see [Integrate your desktop app with package extensions](desktop-to-uwp-extensions.md).
2228

2329
## Get activation info for packaged apps
2430

25-
Starting in Windows 10, version 1809, packaged desktop apps can retrieve certain kinds of activation info during startup. For example, you can get info related to app activation from opening a file, clicking an interactive toast, or using a protocol.
31+
Starting in Windows 10, version 1809, packaged apps can retrieve certain kinds of activation info during startup. For example, you can get info related to app activation from opening a file, from clicking an interactive toast, or from using a protocol.
2632

27-
For more information, see [Get activation info for packaged apps](get-activation-info-for-packaged-apps.md).
33+
For more info, see [Get activation info for packaged apps](get-activation-info-for-packaged-apps.md).
2834

2935
## Extend with UWP components
3036

31-
Some Windows experiences (For example: a touch-enabled UI page) must run inside of a modern app container. In general, you should first determine whether you can add your experience by [enhancing](desktop-to-uwp-enhance.md) your existing desktop application with Windows Runtime APIs. If you have to use a UWP component, to achieve the experience, then you can add a UWP project to your solution and use app services to communicate between your desktop application and the UWP component.
37+
Some Windows experiences (for example, a touch-enabled UI page) must run inside of a modern app container. In general, you should first determine whether you can add your experience by [enhancing](desktop-to-uwp-enhance.md) your existing desktop app with Windows Runtime APIs. If you have to use a UWP component to achieve the experience, then you can add a UWP project to your solution, and use app services to communicate between your desktop app and the UWP component.
3238

3339
For more information, see [Extend your desktop app with UWP components](desktop-to-uwp-extend.md).
3440

3541
## Distribute
3642

37-
If you package your app in an MSIX package, you can distribute it by publishing it the Microsoft Store or by sideloading it onto other systems.
43+
If you package your app in an MSIX package, then it's very easy to distribute it by publishing it the Microsoft Store, or by sideloading it onto systems.
3844

39-
See [Distribute your packaged desktop app](desktop-to-uwp-distribute.md).
45+
For more info, see [Distribute your packaged desktop app](desktop-to-uwp-distribute.md).

hub/apps/package-and-deploy/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Deployment overview
33
description: The topics in this section introduce options and guidance around deploying different types of Windows apps. Your first decision will be whether or not to package your app.
44
ms.topic: article
5-
ms.date: 12/16/2022
5+
ms.date: 05/11/2023
66
ms.localizationpriority: medium
77
---
88

@@ -17,7 +17,7 @@ Your first decision will be whether or not to package your app.
1717
* **Packaged app**. Packaged apps are the only kind that have *package identity* at runtime. Package identity is needed for certain Windows features, such as custom context menu extensions (see [Features that require package identity](../desktop/modernize/modernize-packaged-apps.md)). A packaged app is packaged by using MSIX technology (see [What is MSIX?](/windows/msix/overview)).
1818
* Commonly, a packaged app's process runs inside a lightweight app container; and is isolated using file system and registry virtualization.
1919
* **Packaged app with external location**. But you can opt out of those restrictions and still be a packaged app (still benefit from package identity). You do that by building and registering a *package with external location* with your app. A packaged app with external location uses MSIX to package, but it's not installed by using MSIX (instead, it's a "bring-your-own-installer" model). It's essentially a hybrid option between a packaged and an unpackaged app. See [Grant package identity by packaging with external location](../desktop/modernize/grant-identity-to-nonpackaged-apps.md).
20-
* **Unpackaged app**. Another way to opt out of the restrictions described above is to create an unpackaged app, and not use MSIX at all. But be aware that an unpackaged app *doesn't* have package identity at runtime; so it misses out on certain Windows features.
20+
* **Unpackaged app**. Another way to opt out of the restrictions described above is to create an unpackaged app, and not use MSIX at all. But be aware that an unpackaged app *doesn't* have package identity at runtime; so it misses out on certain Windows features (see [Features that require package identity](/windows/apps/desktop/modernize/modernize-packaged-apps)).
2121

2222
Each type of app can be published to the Microsoft Store, and installed that way or via Windows App Installer.
2323

hub/apps/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ items:
8080
href: windows-app-sdk/index.md
8181
- name: "Use the Windows App SDK in an existing project"
8282
href: windows-app-sdk/use-windows-app-sdk-in-existing-project.md
83+
- name: "Use the Windows App SDK in a WPF app"
84+
href: windows-app-sdk/wpf-plus-winappsdk.md
8385
- name: "Package your app using single-project MSIX"
8486
href: windows-app-sdk/single-project-msix.md
8587
- name: "Update existing projects to the latest release"

hub/apps/windows-app-sdk/tutorial-unpackaged-deployment.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ This article shows how to configure an app that's not installed by using MSIX (t
2020
2121
This topic demonstrates explicitly calling the bootstrapper API from a basic Console app project; but the steps apply to any unpackaged desktop app that uses the Windows App SDK.
2222

23-
Before completing this tutorial, we recommend that you review [Runtime architecture](deployment-architecture.md) to learn more about the *Framework* package dependency that your app takes when it uses the Windows App SDK, and the additional components required to work in a packaged with external location or unpackaged app.
23+
Before completing this tutorial, we recommend that you review [Runtime architecture](./deployment-architecture.md) to learn more about the *Framework* package dependency that your app takes when it uses the Windows App SDK, and the additional components required to work in a packaged with external location or unpackaged app.
2424

2525
## Prerequisites
2626

27-
1. [Install tools for the Windows App SDK](set-up-your-development-environment.md#install-visual-studio).
28-
1. Ensure that all dependencies for packaged with external location and unpackaged apps are installed (see [Windows App SDK deployment guide for framework-dependent apps packaged with external location or unpackaged](deploy-unpackaged-apps.md#prerequisites)). An easy way to do that is to run the Windows App SDK runtime installer.
27+
1. [Install tools for the Windows App SDK](./set-up-your-development-environment.md#install-visual-studio).
28+
1. Ensure that all dependencies for packaged with external location and unpackaged apps are installed (see [Windows App SDK deployment guide for framework-dependent apps packaged with external location or unpackaged](./deploy-unpackaged-apps.md#prerequisites)). An easy way to do that is to run the Windows App SDK runtime installer.
2929

3030
## Instructions
3131

@@ -91,7 +91,7 @@ Follow these instructions to configure a C# WinUI 3 project that's either packag
9191
}
9292
```
9393

94-
At its root, the bootstrapper API is a native C/C++ API that enables you to use the Windows App SDK APIs in your app. But in a .NET app that uses the Windows App SDK 1.0 or later, you can use the [.NET wrapper for the bootstrapper API](use-windows-app-sdk-run-time.md#net-wrapper-for-the-bootstrapper-api). That wrapper provides an easier way of calling the bootstrapper API in a .NET app than calling the native C/C++ functions directly. The previous code example calls the static [**Initialize**](../api-reference/cs-bootstrapper-apis/microsoft.windows.applicationmodel.dynamicdependency/microsoft.windows.applicationmodel.dynamicdependency.bootstrap.md#initialize-methods) and **Shutdown** methods of the **Bootstrap** class in the .NET wrapper for the bootstrapper API.
94+
At its root, the bootstrapper API is a native C/C++ API that enables you to use the Windows App SDK APIs in your app. But in a .NET app that uses the Windows App SDK 1.0 or later, you can use the [.NET wrapper for the bootstrapper API](./use-windows-app-sdk-run-time.md#net-wrapper-for-the-bootstrapper-api). That wrapper provides an easier way of calling the bootstrapper API in a .NET app than calling the native C/C++ functions directly. The previous code example calls the static [**Initialize**](../api-reference/cs-bootstrapper-apis/microsoft.windows.applicationmodel.dynamicdependency/microsoft.windows.applicationmodel.dynamicdependency.bootstrap.md#initialize-methods) and **Shutdown** methods of the **Bootstrap** class in the .NET wrapper for the bootstrapper API.
9595

9696
1. To demonstrate that the Windows App SDK runtime components were loaded properly, add some code that uses the [ResourceManager](/windows/windows-app-sdk/api/winrt/microsoft.windows.applicationmodel.resources.resourcemanager) class in the Windows App SDK to load a string resource.
9797

@@ -131,7 +131,7 @@ Follow these instructions to configure a C++ WinUI 3 project that's either packa
131131
1. In **Solution Explorer**, right-click the **References** node and choose **Manage Nuget Packages**.
132132
1. In the **NuGet Package Manager** window, select the **Browse** tab, and search for **Microsoft.WindowsAppSDK**.
133133

134-
1. You're now ready to use the bootstrapper API (see [Use the Windows App SDK runtime for apps packaged with external location or unpackaged](use-windows-app-sdk-run-time.md)) to initialize the Windows App SDK runtime in your app. This enables you to use the Windows App SDK APIs in the app.
134+
1. You're now ready to use the bootstrapper API (see [Use the Windows App SDK runtime for apps packaged with external location or unpackaged](./use-windows-app-sdk-run-time.md)) to initialize the Windows App SDK runtime in your app. This enables you to use the Windows App SDK APIs in the app.
135135

136136
1. Add the following include files to the top of your **DynamicDependenciesTest.cpp** file. The [mddbootstrap.h](/windows/windows-app-sdk/api/win32/mddbootstrap) header is available via the Windows App SDK NuGet package.
137137

@@ -207,9 +207,9 @@ Follow these instructions to configure a C++ WinUI 3 project that's either packa
207207

208208
## If your project is WPF
209209

210-
For a Windows Presentation Foundation (WPF) app, also add `<RuntimeIdentifiers>win10-x64</RuntimeIdentifiers>` to your project file.
210+
For a Windows Presentation Foundation (WPF) app, see [Use the Windows App SDK in a WPF app](./wpf-plus-winappsdk.md).
211211

212212
## Related topics
213213

214-
* [Windows App SDK deployment guide for framework-dependent apps packaged with external location or unpackaged](deploy-unpackaged-apps.md)
215-
* [Runtime architecture](deployment-architecture.md)
214+
* [Windows App SDK deployment guide for framework-dependent apps packaged with external location or unpackaged](./deploy-unpackaged-apps.md)
215+
* [Runtime architecture](./deployment-architecture.md)

0 commit comments

Comments
 (0)