-
Notifications
You must be signed in to change notification settings - Fork 285
Add WpfCalculator app in a parallel directory to DrawingIsland, with steps #353
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
Draft
JesseCol
wants to merge
49
commits into
user/jeffstall/drawingisland
Choose a base branch
from
user/jessecol/calc-app
base: user/jeffstall/drawingisland
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 11 commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
fc62c9a
Add nuget.config entry for .net9
JesseCol 90a4cdf
Complete working WpfCalculator app with packaging and WASDK additions
JesseCol 3330176
Remove the hardcoded size for the compact overlay
JesseCol d7fe0db
Improve workaround in wapproj
JesseCol 07b3393
Add demo steps
JesseCol bba7d97
Add another comment
JesseCol fae1230
readme
JesseCol 7b3a154
More step comments
JesseCol 876d976
More step comments
JesseCol 1ebb414
readme
JesseCol 0279130
Improve Demo4_Step2_AddIsland
JesseCol c686112
PR feedback: organize usings, and remove AnyCPU
JesseCol 140855a
Port latest Text changes
jeffstall 3a516e6
Merge branch 'user/jessecol/calc-app' of https://github.com/microsoft…
jeffstall 260700b
Turn everyone on for testing
jeffstall 9c03c97
Latest fixes from Niklas
jeffstall 38ccb7e
Split demos into different partial files
jeffstall b9cfdf1
Merge remote-tracking branch 'origin/user/jeffstall/drawingisland' in…
JesseCol ed98180
Add Lottie Island to WpfCalculator
JesseCol d35d72b
Add SceneNodeIsland, but it hangs :-(
JesseCol 6d3df7a
Work around for async loading in WPF
jeffstall 9f4aec3
Minor clean-up for //build
jeffstall cc4f50d
//build start
jeffstall df06074
Updated //build steps
jeffstall d0ea9c0
Clean up for //build demo
jeffstall 871aabb
Move files unused for //build
jeffstall 6a36d7b
Handle transparent rendering in WPF.
jeffstall 50adf5c
Fix for WPF transparent rendering
jeffstall cac50ed
Make compact calc better
JesseCol 3fd34bd
Cleanup and make RS5
jeffstall 96fc451
Make the calc work in compact mode
JesseCol 2ce727c
Remove code in UpdateDisplay to update CompactViewText manually
JesseCol 26c31a9
Change layout to make it look good at the same size as the original calc
JesseCol 5f17057
Remove extra changes I inlcuded for the layout change
JesseCol e55aef4
Fix the demo to start at zero and have the smaller layout.
JesseCol 248173e
Fix app.xaml to work with .net9
30ce5f8
Remove .net entry from nuget.config
c0553eb
Add DrawingIslandCSProjection to sln
de0e13b
Update to WinAppSDK 1.6
6e0e619
Update DrawingIsland to WASDK 1.6
2969af0
Turn ON all the steps
9d01df8
Update comments for Ignite demo script
jeffstall 2d8bcbf
START 11-14-2024
jeffstall bf3e795
START 11-14-2024 (B): Fix DrawingIsland
jeffstall b00c6e0
Move to WinAppSDK 1.6.1
ce2268e
Use ThemeMode API instead of pack URI
7b2c2c0
Set DpiMode to per-mon-v2, include comentted code to turn off the bac…
01c8297
LKG 2024-11-17 Refine start
jeffstall fcc3bd9
LKG: 2024-11-19 Simplify
jeffstall File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
|
||
<configuration> | ||
<startup> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" /> | ||
</startup> | ||
</configuration> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// // Copyright (c) Microsoft. All rights reserved. | ||
// // Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
#if false // Demo3_Step1_AddWasdk | ||
using Microsoft.UI.Dispatching; | ||
#endif | ||
using System.Windows; | ||
|
||
namespace CalculatorDemo | ||
{ | ||
/// <summary> | ||
/// Interaction logic for App.xaml | ||
/// </summary> | ||
public partial class App : Application | ||
{ | ||
#if false // Demo3_Step1_AddWasdk | ||
// Many WinAppSDK APIs require a DispatcherQueue to be running on the thread. We'll start one when the app starts up | ||
// and shut it down when the app is finished. | ||
protected override void OnStartup(StartupEventArgs e) | ||
{ | ||
_dispatcherQueueController = DispatcherQueueController.CreateOnCurrentThread(); | ||
base.OnStartup(e); | ||
} | ||
|
||
protected override void OnExit(ExitEventArgs e) | ||
{ | ||
base.OnExit(e); | ||
_dispatcherQueueController?.ShutdownQueue(); | ||
_dispatcherQueueController = null; | ||
} | ||
|
||
DispatcherQueueController? _dispatcherQueueController; | ||
#endif | ||
} | ||
|
||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<Application x:Class="CalculatorDemo.App" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
StartupUri="MainWindow.xaml"> | ||
<!-- | ||
We add the below ResourceDictionary to our Application's Merged | ||
ResourceDictionaries so that our app will pick up the new styles. The | ||
pack URI | ||
(https://learn.microsoft.com/en-us/dotnet/desktop/wpf/app-development/pack-uris-in-wpf) | ||
below tells WPF to open the referenced assembly named | ||
"PresentationFramework.Fluent.dll" and read a Xaml resource from it. | ||
--> | ||
<Application.Resources> | ||
<ResourceDictionary> | ||
<ResourceDictionary.MergedDictionaries> | ||
<ResourceDictionary | ||
Source="pack://application:,,,/PresentationFramework.Fluent;component/Resources/Fluent.xaml" /> | ||
</ResourceDictionary.MergedDictionaries> | ||
</ResourceDictionary> | ||
</Application.Resources> | ||
</Application> |
153 changes: 153 additions & 0 deletions
153
Samples/Islands/WpfCalculator/CalculatorDemo/CalculatorDemo.csproj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,153 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<!-- WinAppSDK requires at least the 17763 build of windows, so we need to set that here. | ||
You can set this in the Visual Studio project properties UI too. --> | ||
<TargetFramework>net9.0-windows10.0.22621.0</TargetFramework> | ||
<UseWpf>true</UseWpf> | ||
<EnableDefaultItems>false</EnableDefaultItems> | ||
<Platforms>x64;ARM64;x86</Platforms> | ||
|
||
<!-- When adding a reference to WinAppSDK, we need to enable only the RIDs for the platforms WinAppSDK supprts. --> | ||
<RuntimeIdentifiers>win-x64;win-x86;win-arm64</RuntimeIdentifiers> | ||
|
||
<!-- These flags turn off some WinAppSDK features we won't be using. --> | ||
<UseWinUITools>false</UseWinUITools> | ||
<EnableCoreMrtTooling>false</EnableCoreMrtTooling> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{5731865D-6685-47A7-8877-5DBAF39B54CD}</ProjectGuid> | ||
<OutputType>WinExe</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>CalculatorDemo</RootNamespace> | ||
<AssemblyName>CalculatorDemo</AssemblyName> | ||
<FileAlignment>512</FileAlignment> | ||
<WarningLevel>4</WarningLevel> | ||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x86'"> | ||
<PlatformTarget>AnyCPU</PlatformTarget> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>portable</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> | ||
<PlatformTarget>AnyCPU</PlatformTarget> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>portable</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> | ||
<PlatformTarget>AnyCPU</PlatformTarget> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>portable</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x86'"> | ||
<PlatformTarget>AnyCPU</PlatformTarget> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> | ||
<PlatformTarget>AnyCPU</PlatformTarget> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> | ||
<PlatformTarget>AnyCPU</PlatformTarget> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<ApplicationDefinition Include="App.xaml"> | ||
<Generator>MSBuild:Compile</Generator> | ||
<SubType>Designer</SubType> | ||
</ApplicationDefinition> | ||
<Page Include="MainWindow.xaml"> | ||
<Generator>MSBuild:Compile</Generator> | ||
<SubType>Designer</SubType> | ||
</Page> | ||
<Compile Include="App.cs"> | ||
<DependentUpon>App.xaml</DependentUpon> | ||
<SubType>Code</SubType> | ||
</Compile> | ||
<Compile Include="MainWindow.cs"> | ||
<DependentUpon>MainWindow.xaml</DependentUpon> | ||
<SubType>Code</SubType> | ||
</Compile> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="MyTextBox.cs" /> | ||
<Compile Include="Properties\Resources.Designer.cs"> | ||
<AutoGen>True</AutoGen> | ||
<DesignTime>True</DesignTime> | ||
<DependentUpon>Resources.resx</DependentUpon> | ||
</Compile> | ||
<Compile Include="Properties\Settings.Designer.cs"> | ||
<AutoGen>True</AutoGen> | ||
<DependentUpon>Settings.settings</DependentUpon> | ||
<DesignTimeSharedInput>True</DesignTimeSharedInput> | ||
</Compile> | ||
<!-- Demo4_Step2_AddIsland | ||
<Compile Include="WpfIslandHost.cs" /> | ||
--> | ||
<EmbeddedResource Include="Properties\Resources.resx"> | ||
<Generator>ResXFileCodeGenerator</Generator> | ||
<LastGenOutput>Resources.Designer.cs</LastGenOutput> | ||
</EmbeddedResource> | ||
<None Include="Properties\Settings.settings"> | ||
<Generator>SettingsSingleFileGenerator</Generator> | ||
<LastGenOutput>Settings.Designer.cs</LastGenOutput> | ||
</None> | ||
<AppDesigner Include="Properties\" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="App.config" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<!-- Demo3_Step1_AddWasdk | ||
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.0.7" /> | ||
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.5.240428000" /> | ||
--> | ||
</ItemGroup> | ||
<!-- Demo4_Step2_AddIsland | ||
<ItemGroup> | ||
<ProjectReference Include="..\DrawingIslandCsProjection\DrawingIslandCsProjection.csproj" /> | ||
</ItemGroup> | ||
--> | ||
<ItemGroup> | ||
<Resource Include="appicon.ico" /> | ||
</ItemGroup> | ||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. | ||
Other similar extension points exist, see Microsoft.Common.targets. | ||
<Target Name="BeforeBuild"> | ||
</Target> | ||
<Target Name="AfterBuild"> | ||
</Target> | ||
--> | ||
</Project> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Can you fix to completely remove "Any CPU" and "arm"?