-
Notifications
You must be signed in to change notification settings - Fork 229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a WPF sample app that uses WinAppSDK #334
base: main
Are you sure you want to change the base?
Changes from 1 commit
a194d43
430d237
ff89f6d
f317d81
b5261ee
427601a
b9dedad
6bf822b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
## WpfWithIslandApp | ||
|
||
This app demonstrates how to add a WinAppSDK island to a WPF app. | ||
|
||
The WPF app was converted to an MSIX packaged app. The **AppPackaging.wapproj** project accomplishes this. [More info here](https://learn.microsoft.com/en-us/windows/msix/desktop/desktop-to-uwp-packaging-dot-net). | ||
|
||
Look for the token `Changed_from_original_app` to see what changes were made to the project file to pull in **WindowsAppSDK**. | ||
|
||
|
||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,9 +4,9 @@ | |
<OutputType>WinExe</OutputType> | ||
|
||
<!-- | ||
NOTE: Normally in net8 one wouldn't set a speficic Windows version, but | ||
If we leave this as "net8.0-windows", we get an error because TargetPlatformVersion | ||
is not set in this file: Microsoft.InteractiveExperiences.Common.targets | ||
Changed_from_original_app | ||
The lowest version of Windows that WinAppSDK supports is 17763. | ||
But Lottie requires Windows 10.0.19041.0 or higher, so we target this one. | ||
--> | ||
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework> | ||
|
||
|
@@ -15,21 +15,27 @@ | |
<UseWPF>true</UseWPF> | ||
|
||
<!-- | ||
NOTE: This seems to be required when we use the version number in the TargetFramework | ||
property. | ||
TODO: Figure out if there's a more correct way. | ||
--> | ||
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers> | ||
<Platforms>AnyCPU;x86;x64</Platforms> | ||
Changed_from_original_app | ||
Set RuntimeIdentifiers explicitly to portable RIDs. | ||
Set the Platforms property as well. We don't support AnyCPU because WinAppSDK contains native code. | ||
--> | ||
<RuntimeIdentifiers>win-x64;win-x86;win-arm64</RuntimeIdentifiers> | ||
<Platforms>x64;x86;ARM64</Platforms> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<!-- These packages aren't currently publicly available. --> | ||
<!-- | ||
Changed_from_original_app: These packages are required for Lottie. | ||
FIX BEFORE COMPLETING PR: These packages aren't currently publicly available. | ||
--> | ||
<PackageReference Include="CommunityToolkit.WinAppSDK.LottieIsland" Version="0.1.1-prerelease.2" /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @JesseCol, can you check with Geoffrey whether this is the correct Lottie NuGet package that he's assembled? |
||
<PackageReference Include="CommunityToolkit.WinUI.Lottie" Version="8.0.230818-rc-FHL.4.gb41d8fdcc0" /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here. We don't want to pull in WinUI Lottie, just WinAppSDK. |
||
<PackageReference Include="LottieWinRT" Version="0.1.1-prerelease.1" /> | ||
|
||
<PackageReference Include="Microsoft.Graphics.Win2D" Version="1.2.0" /> | ||
|
||
<!-- | ||
Changed_from_original_app: Pull in WinAppSDK. | ||
--> | ||
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.5.240404000" /> | ||
</ItemGroup> | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JesseCol, WinAppSDK Lottie only requires RS5 (the same as the rest of WASDK). Let's follow-up on this one.