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/windows-app-sdk/migrate-to-windows-app-sdk/case-study-1.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ Begin by [cloning the UWP sample app's repo](https://github.com/microsoft/window
20
20
21
21
## Install the Windows App SDK VSIX
22
22
23
-
If you haven't already, then download the Windows App SDK Visual Studio extension (VSIX) installer, and run to install it. See from [Windows App SDK release channels](/windows/apps/windows-app-sdk/release-channels).
23
+
If you haven't already, then download the Windows App SDK Visual Studio extension (VSIX) installer, and run to install it. See [Windows App SDK release channels](/windows/apps/windows-app-sdk/release-channels).
24
24
25
25
> [!IMPORTANT]
26
26
> You'll find release notes topics along with the [Windows App SDK release channels](/windows/apps/windows-app-sdk/release-channels) topic. There are release notes for each channel. Be sure to check any *limitations and known issues* in those release notes, since those might affect the results of following along with this case study and/or running the migrated app.
Copy file name to clipboardExpand all lines: hub/apps/windows-app-sdk/migrate-to-windows-app-sdk/case-study-2.md
+12-15Lines changed: 12 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ Begin by [cloning the UWP sample app's repo](https://github.com/microsoft/window
20
20
21
21
## Install the Windows App SDK VSIX
22
22
23
-
If you haven't already, then download the Windows App SDK Visual Studio extension (VSIX) installer, and run to install it. See from [Windows App SDK release channels](/windows/apps/windows-app-sdk/release-channels).
23
+
If you haven't already, then download the Windows App SDK Visual Studio extension (VSIX) installer, and run to install it. See [Windows App SDK release channels](/windows/apps/windows-app-sdk/release-channels).
24
24
25
25
> [!IMPORTANT]
26
26
> You'll find release notes topics along with the [Windows App SDK release channels](/windows/apps/windows-app-sdk/release-channels) topic. There are release notes for each channel. Be sure to check any *limitations and known issues* in those release notes, since those might affect the results of following along with this case study and/or running the migrated app.
@@ -38,7 +38,7 @@ In Visual Studio, create a new C++/WinRT project from the **Blank App, Packaged
38
38
39
39
* We'll begin by copying over the asset files.
40
40
* Then we'll migrate the **Photo** model.
41
-
* Next we'll migrate the **App** class (since that needs some members adding to it that **DetailPage** and **MainPage** will depend on).
41
+
* Next we'll migrate the **App** class (because that needs some members adding to it that **DetailPage** and **MainPage** will depend on).
42
42
* Then we'll begin migrating the views, starting with **DetailPage** first.
43
43
* And we'll finish up by migrating the **MainPage** view.
44
44
@@ -108,7 +108,7 @@ Now confirm that you can build the target solution (but don't run yet).
108
108
109
109
## Migrate the App class
110
110
111
-
No changes are necessary to the target project's `App.idl` and `App.xaml`. But we do need to edit `App.xaml.h` and App`.xaml.cpp` to add some new members to the **App** class. We'll do so in a way that lets us build after each section.
111
+
No changes are necessary to the target project's `App.idl` and `App.xaml`. But we do need to edit `App.xaml.h` and App`.xaml.cpp` to add some new members to the **App** class. We'll do so in a way that lets us build after each section (with the exception of the last section).
The code above gives **App** a dependency on **MainPage**, so we won't be able to build yet.
173
+
The code above gives **App** a dependency on **MainPage**, so we won't be able to build from this point until we've migrated **DetailPage** and then **MainPage**. When we're able to build again, we'll say so.
174
174
175
175
## Migrate the DetailPage view
176
176
177
177
**DetailPage** is the class that represents the photo editor page, where Win2D effects are toggled, set, and chained together. You get to the photo editor page by selecting a photo thumbnail on **MainPage**. **DetailPage** is a *view* (in the sense of models, views, and viewmodels).
178
178
179
179
### Reference the Win2D NuGet package
180
180
181
-
To support code in **DetailPage**, the source project has a dependency on [Win2D](https://microsoft.github.io/Win2D/WinUI3/html/Introduction.htm). So we'll also need a dependency on Win2D in our target project. But Win2D itself has a dependency on [DWriteCore](/windows/win32/directwrite/dwritecore-overview). So let's add the NuGet packages in the following order.
181
+
To support code in **DetailPage**, the source project has a dependency on [Win2D](https://microsoft.github.io/Win2D/WinUI3/html/Introduction.htm). So we'll also need a dependency on Win2D in our target project.
182
182
183
-
* In the target solution in Visual Studio, click **Tools** > **NuGet Package Manager** > **Manage NuGet Packages for Solution...** > **Browse**, and type or paste *Microsoft.WindowsAppSDK.DWrite*. Select the correct item in search results, check the *PhotoEditor* project, and click **Install** to install the package into that project.
184
-
* Repeat those steps for the *Microsoft.Graphics.Win2D* NuGet package.
183
+
* In the target solution in Visual Studio, click **Tools** > **NuGet Package Manager** > **Manage NuGet Packages for Solution...** > **Browse**. Make sure that **Include prerelease** is unchecked, and type or paste *Microsoft.Graphics.Win2D* into the search box. Select the correct item in search results, check the *PhotoEditor* project, and click **Install** to install the package.
185
184
186
185
### Copy DetailPage source code files
187
186
@@ -213,7 +212,7 @@ Save and close the project file. When you set focus back to Visual Studio, click
213
212
214
213
In `DetailPage.idl`, search for `Windows.UI.Xaml`, and change that to `Microsoft.UI.Xaml`.
215
214
216
-
In `DetailPage.xaml.cpp`, change `#include "DetailPage.h"` to `#include "DetailPage.xaml.h"`. Immediately below that, add `#include "DetailPage.g.cpp"`. And (for the call to the static **App::Window** method to compile), add `#include "App.xaml.h"` immediately before `#include "Photo.h"`.
215
+
In `DetailPage.xaml.cpp`, change `#include "DetailPage.h"` to `#include "DetailPage.xaml.h"`. Immediately below that, add `#include "DetailPage.g.cpp"`. And (for the call to the static **App::Window** method, which we're about to add, to compile), add `#include "App.xaml.h"` immediately before `#include "Photo.h"`.
217
216
218
217
Make the following find/replacements (match case and whole word) in the contents of all of the source code in the files that you just copied and pasted.
219
218
@@ -224,7 +223,9 @@ Make the following find/replacements (match case and whole word) in the contents
224
223
From `pch.h` in the source project, copy the following includes, and paste them into `pch.h` in the target project.
@@ -247,7 +248,7 @@ The main page of the app represents the view that you see first when you run the
247
248
248
249
### Copy MainPage source code files
249
250
250
-
Similar to what you did with **DetailPage**, now copy over `MainPage.idl`, `MainPage.xaml`, `MainPage.h`, and `MainPage.cpp`. Rename the `.h` and `.cpp` files to `.xaml.h` and `.xaml.cpp`, respectively. Include all four files in the target project.
251
+
Similar to what you did with **DetailPage**, now copy over `MainPage.idl`, `MainPage.xaml`, `MainPage.h`, and `MainPage.cpp`. Rename the `.h` and `.cpp` files to `.xaml.h` and `.xaml.cpp`, respectively. Include all four files in the target project like before.
251
252
252
253
In the source project, in **Solution Explorer**, `MainPage.idl` is nested under `MainPage.xaml`. If you like that arrangement, then you can do the same thing in the target project by manually editing `\PhotoEditor\PhotoEditor\PhotoEditor\PhotoEditor.vcxproj`. Find the following:
253
254
@@ -269,7 +270,7 @@ In `MainPage.idl`, search for `Windows.UI.Xaml`, and change both occurrences to
269
270
270
271
In `MainPage.xaml.cpp`, change `#include "MainPage.h"` to `#include "MainPage.xaml.h"`.
271
272
272
-
Immediately below that, add `#include "MainPage.g.cpp"`. And (for the call to the static **App::Window** method to compile) add `#include "App.xaml.h"` immediately before `#include "Photo.h"`.
273
+
Immediately below that, add `#include "MainPage.g.cpp"`. And (for the call to the static **App::Window** method, which we're about to add, to compile) add `#include "App.xaml.h"` immediately before `#include "Photo.h"`.
273
274
274
275
For the next step, we'll make the change that's explained in [ContentDialog, and Popup](guides/winui3.md#contentdialog-and-popup). So, still in `MainPage.xaml.cpp`, in the **MainPage::GetItemsAsync** method, immediately after the line `ContentDialog unsupportedFilesDialog{};`, add this line of code.
275
276
@@ -301,7 +302,7 @@ In `MainWindow.idl`, delete the placeholder `Int32 MyProperty;`, leaving only th
301
302
302
303
In `MainWindow.xaml.h` and `MainWindow.xaml.cpp`, delete the declarations and definitions of the placeholder **MyProperty** and **myButton_Click**, leaving only the constructor.
303
304
304
-
Those are the last of the changes we need to make to migrate the *Photo Editor* sample app. In the next section we'll confirm that we've correctly followed the steps.
305
+
Those are the last of the changes we need to make to migrate the *Photo Editor* sample app. In the **Test the migrated app** section we'll confirm that we've correctly followed the steps.
305
306
306
307
## Known issues
307
308
@@ -360,10 +361,6 @@ The following listing identifies file names, methods, and lines of code that nee
360
361
}
361
362
```
362
363
363
-
### The Win2D NuGet package, and Preview 3
364
-
365
-
The *Microsoft.Graphics.Win2D* NuGet package isn't compatible with the Windows App SDK [version 1.0 Preview 3 (1.0.0-preview3)](/windows/apps/windows-app-sdk/preview-channel). If you're using that version, then remove the reference to the NuGet package, and comment out the source code that depends on it (specifically, the use of **Microsoft::Graphics::Canvas::Effects** types in **DetailPage**).
366
-
367
364
## Test the migrated app
368
365
369
366
Now build the project, and run the app to test it. Select an image, set a zoom level, choose effects, and configure them.
Copy file name to clipboardExpand all lines: hub/apps/windows-app-sdk/reference-framework-package-run-time.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ For background information about framework packages, see [MSIX framework package
15
15
> [!NOTE]
16
16
> In addition to the bootstrapper API, the Windows App SDK also provides an implementation of the *dynamic dependency API*. This API enables your unpackaged apps to take a dependency on *any* framework package (not just the Windows App SDK framework package), and it is used internally by the bootstrapper API. For more information about the dynamic dependency API, see [Reference framework packages at run time](../desktop/modernize/framework-packages/use-the-dynamic-dependency-api.md).
17
17
18
-
## Using the bootrapper API
18
+
## Using the bootstrapper API
19
19
20
20
The bootstrapper API consists of two C/C++ functions that are declared in the [mddbootstrap.h](/windows/windows-app-sdk/api/win32/mddbootstrap) header file in the Windows App SDK: [MddBootstrapInitialize](/windows/windows-app-sdk/api/win32/mddbootstrap/nf-mddbootstrap-mddbootstrapinitialize) and [MddBootstrapShutdown](/windows/windows-app-sdk/api/win32/mddbootstrap/nf-mddbootstrap-mddbootstrapshutdown). These functions are provided by the [bootstrapper](deployment-architecture.md#bootstrapper) library in the Windows App SDK. This library is a small DLL that must be distributed with your app; it is not part of the framework package itself.
0 commit comments