From 0c560df26e687254d04074d87249a31c5f42ec6d Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Wed, 7 Aug 2024 18:22:58 -0500 Subject: [PATCH 01/23] Fix ambiguous references to TitleBar --- components/TitleBar/samples/TitleBarConfigSample.xaml.cs | 2 +- components/TitleBar/samples/TitleBarFullSample.xaml.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/TitleBar/samples/TitleBarConfigSample.xaml.cs b/components/TitleBar/samples/TitleBarConfigSample.xaml.cs index 645efe4e..4269270c 100644 --- a/components/TitleBar/samples/TitleBarConfigSample.xaml.cs +++ b/components/TitleBar/samples/TitleBarConfigSample.xaml.cs @@ -14,7 +14,7 @@ namespace TitleBarExperiment.Samples; [ToolkitSampleBoolOption("ShowBackButtonSetting", false, Title = "ShowBackButton")] [ToolkitSampleBoolOption("ShowPaneButtonSetting", false, Title = "ShowPaneButton")] -[ToolkitSample(id: nameof(TitleBarConfigSample), "Full titlebar sample", description: $"A sample for showing how to create and use a {nameof(TitleBar)} in a window.")] +[ToolkitSample(id: nameof(TitleBarConfigSample), "Full titlebar sample", description: $"A sample for showing how to create and use a {nameof(CommunityToolkit.WinUI.Controls.TitleBar)} in a window.")] public sealed partial class TitleBarConfigSample : Page { public TitleBarConfigSample() diff --git a/components/TitleBar/samples/TitleBarFullSample.xaml.cs b/components/TitleBar/samples/TitleBarFullSample.xaml.cs index 8bede493..546d4ec0 100644 --- a/components/TitleBar/samples/TitleBarFullSample.xaml.cs +++ b/components/TitleBar/samples/TitleBarFullSample.xaml.cs @@ -10,7 +10,7 @@ using Windows.UI.ViewManagement; #endif namespace TitleBarExperiment.Samples; -[ToolkitSample(id: nameof(TitleBarFullSample), "Full titlebar sample", description: $"A sample for showing how to create and use a {nameof(TitleBar)} in a window.")] +[ToolkitSample(id: nameof(TitleBarFullSample), "Full titlebar sample", description: $"A sample for showing how to create and use a {nameof(CommunityToolkit.WinUI.Controls.TitleBar)} in a window.")] public sealed partial class TitleBarFullSample : Page { public TitleBarFullSample() From 729f407db825f6781b2d9f4f916a18a05b7507f2 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Wed, 7 Aug 2024 18:23:37 -0500 Subject: [PATCH 02/23] Cleanup for ambiguous reference fix --- .../MarkdownTextBlock/src/TextElements/MyEmphasisInline.cs | 7 ++++++- components/MarqueeText/src/MarqueeText.Properties.cs | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/components/MarkdownTextBlock/src/TextElements/MyEmphasisInline.cs b/components/MarkdownTextBlock/src/TextElements/MyEmphasisInline.cs index ef30998f..810b86a5 100644 --- a/components/MarkdownTextBlock/src/TextElements/MyEmphasisInline.cs +++ b/components/MarkdownTextBlock/src/TextElements/MyEmphasisInline.cs @@ -51,7 +51,7 @@ internal class MyEmphasisInline : IAddChild public void SetBold() { - _span.FontWeight = FontWeights.Bold; + _span.FontWeight = Windows.UI.Text.FontWeights.Bold; _isBold = true; } @@ -63,7 +63,12 @@ internal class MyEmphasisInline : IAddChild public void SetStrikeThrough() { + #if WINUI3 _span.TextDecorations = TextDecorations.Strikethrough; + #elif WINUI2 + _span.TextDecorations = Windows.UI.Text.TextDecorations.Strikethrough; + #endif + _isStrikeThrough = true; } diff --git a/components/MarqueeText/src/MarqueeText.Properties.cs b/components/MarqueeText/src/MarqueeText.Properties.cs index c7f20725..77212aea 100644 --- a/components/MarqueeText/src/MarqueeText.Properties.cs +++ b/components/MarqueeText/src/MarqueeText.Properties.cs @@ -98,7 +98,11 @@ public partial class MarqueeText /// /// Gets or sets a value that indicates what decorations are applied to the text. /// +#if WINUI3 public TextDecorations TextDecorations +#elif WINUI2 + public Windows.UI.Text.TextDecorations TextDecorations +#endif { get => (TextDecorations)GetValue(TextDecorationsProperty); set => SetValue(TextDecorationsProperty, value); From ce970ba2cbd8e9fd54cd11236fad053c9fb5a0e5 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Wed, 7 Aug 2024 18:30:46 -0500 Subject: [PATCH 03/23] Fixed CsWinRT1028 --- components/CanvasLayout/src/CanvasLayout.cs | 2 +- components/RivePlayer/src/StateMachineInputCollection.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/CanvasLayout/src/CanvasLayout.cs b/components/CanvasLayout/src/CanvasLayout.cs index ea8b8513..a6ac2264 100644 --- a/components/CanvasLayout/src/CanvasLayout.cs +++ b/components/CanvasLayout/src/CanvasLayout.cs @@ -4,7 +4,7 @@ namespace CommunityToolkit.Labs.WinUI; -public class CanvasLayout : MUXC.VirtualizingLayout +public partial class CanvasLayout : MUXC.VirtualizingLayout { #region Setup / teardown protected override void InitializeForContextCore(MUXC.VirtualizingLayoutContext context) diff --git a/components/RivePlayer/src/StateMachineInputCollection.cs b/components/RivePlayer/src/StateMachineInputCollection.cs index 5b509115..bbd93c22 100644 --- a/components/RivePlayer/src/StateMachineInputCollection.cs +++ b/components/RivePlayer/src/StateMachineInputCollection.cs @@ -15,7 +15,7 @@ namespace CommunityToolkit.Labs.WinUI.Rive; /// /// /// -public class StateMachineInputCollection : DependencyObjectCollection +public partial class StateMachineInputCollection : DependencyObjectCollection { private WeakReference _rivePlayer = new WeakReference(null!); From 411ab592957e7608dfd9b5f4675414b94f15f18c Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Wed, 7 Aug 2024 18:34:48 -0500 Subject: [PATCH 04/23] Update WinAppSDK to 1.6.240701003-experimental2 --- tooling | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tooling b/tooling index fda081e1..66595f75 160000 --- a/tooling +++ b/tooling @@ -1 +1 @@ -Subproject commit fda081e11081ec7b0c034cdacbb817d906128b24 +Subproject commit 66595f7540615e9ccc6a5c9b75d11e34903e0aee From 622a1a8b171bec8f0e9cbb516f2850c40ff61895 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Thu, 8 Aug 2024 14:14:07 -0500 Subject: [PATCH 05/23] Fix ambiugous reference --- .../MarkdownTextBlock/src/TextElements/MyEmphasisInline.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/MarkdownTextBlock/src/TextElements/MyEmphasisInline.cs b/components/MarkdownTextBlock/src/TextElements/MyEmphasisInline.cs index 810b86a5..f422abcf 100644 --- a/components/MarkdownTextBlock/src/TextElements/MyEmphasisInline.cs +++ b/components/MarkdownTextBlock/src/TextElements/MyEmphasisInline.cs @@ -51,7 +51,12 @@ internal class MyEmphasisInline : IAddChild public void SetBold() { + #if WINUI3 + _span.FontWeight = FontWeights.Bold; + #elif WINUI2 _span.FontWeight = Windows.UI.Text.FontWeights.Bold; + #endif + _isBold = true; } From da4c61e065e172f6eb711ddd5155bdd5fd8ba558 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Thu, 8 Aug 2024 18:21:51 -0500 Subject: [PATCH 06/23] Fully qualify Microsoft.UI.Text.FontWeights --- .../MarkdownTextBlock/src/TextElements/MyEmphasisInline.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/MarkdownTextBlock/src/TextElements/MyEmphasisInline.cs b/components/MarkdownTextBlock/src/TextElements/MyEmphasisInline.cs index f422abcf..eb88341e 100644 --- a/components/MarkdownTextBlock/src/TextElements/MyEmphasisInline.cs +++ b/components/MarkdownTextBlock/src/TextElements/MyEmphasisInline.cs @@ -52,7 +52,7 @@ internal class MyEmphasisInline : IAddChild public void SetBold() { #if WINUI3 - _span.FontWeight = FontWeights.Bold; + _span.FontWeight = Microsoft.UI.Text.FontWeights.Bold; #elif WINUI2 _span.FontWeight = Windows.UI.Text.FontWeights.Bold; #endif From c70f95d974081cfdbea3fa85a62ec9386c5b6c13 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Fri, 9 Aug 2024 13:51:11 -0500 Subject: [PATCH 07/23] Update tooling --- tooling | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tooling b/tooling index 66595f75..127bdc30 160000 --- a/tooling +++ b/tooling @@ -1 +1 @@ -Subproject commit 66595f7540615e9ccc6a5c9b75d11e34903e0aee +Subproject commit 127bdc307ac1162d25d8fd52116a38f0e17b0959 From a51b16d647f50aeacef524d174e9cb4d6e7f80e6 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Fri, 9 Aug 2024 17:24:50 -0500 Subject: [PATCH 08/23] Update tooling --- tooling | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tooling b/tooling index 127bdc30..25c4ea8d 160000 --- a/tooling +++ b/tooling @@ -1 +1 @@ -Subproject commit 127bdc307ac1162d25d8fd52116a38f0e17b0959 +Subproject commit 25c4ea8dc75584d9be4f809af1972ce6d55d3682 From e8895722c167c4aef3568e086ae18055da85c93c Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Mon, 12 Aug 2024 19:24:20 -0500 Subject: [PATCH 09/23] Add CsWinRT1028 suppression --- Directory.Build.props | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Directory.Build.props b/Directory.Build.props index 766daa63..7db0e797 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -13,6 +13,15 @@ true true $(NoWarn);Uno0001 + + $(NoWarn);CsWinRT1028; From 27e81e4ba69f7da6d12cc994e227b1f7230b1838 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Wed, 14 Aug 2024 11:49:29 -0500 Subject: [PATCH 10/23] Update Microsoft.WindowsAppSDK to 1.6.240807006-preview1, remove CsWinRT1028 suppression. --- Directory.Build.props | 11 +---------- tooling | 2 +- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 7db0e797..74436b01 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -12,16 +12,7 @@ true true - $(NoWarn);Uno0001 - - $(NoWarn);CsWinRT1028; + $(NoWarn);Uno0001 diff --git a/tooling b/tooling index 25c4ea8d..edda2bed 160000 --- a/tooling +++ b/tooling @@ -1 +1 @@ -Subproject commit 25c4ea8dc75584d9be4f809af1972ce6d55d3682 +Subproject commit edda2bedde1766d704129ffe151d2bbb07eaa4d8 From 2fe3801fd4092667eadfc0220037957144033255 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Wed, 14 Aug 2024 12:29:39 -0500 Subject: [PATCH 11/23] Fixed CsWinRT1028 errors --- .../MarkdownTextBlock/src/TextElements/MyTableUIElement.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/MarkdownTextBlock/src/TextElements/MyTableUIElement.cs b/components/MarkdownTextBlock/src/TextElements/MyTableUIElement.cs index dfe6883d..8188d961 100644 --- a/components/MarkdownTextBlock/src/TextElements/MyTableUIElement.cs +++ b/components/MarkdownTextBlock/src/TextElements/MyTableUIElement.cs @@ -4,7 +4,7 @@ namespace CommunityToolkit.Labs.WinUI.MarkdownTextBlock.TextElements; -internal class MyTableUIElement : Panel +internal partial class MyTableUIElement : Panel { private readonly int _columnCount; private readonly int _rowCount; From ecaa8dcbe123b21d1e3354e2807853b36d3a4053 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Wed, 14 Aug 2024 13:28:12 -0500 Subject: [PATCH 12/23] Update WindowsSdkPackageVersion for Wasdk 1.6 preview1 --- tooling | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tooling b/tooling index edda2bed..336ef4c2 160000 --- a/tooling +++ b/tooling @@ -1 +1 @@ -Subproject commit edda2bedde1766d704129ffe151d2bbb07eaa4d8 +Subproject commit 336ef4c2385d8357453f80bffad826ef5a2742ce From 84521301656fcd4cb0215d06ff95f3894297ed81 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Wed, 14 Aug 2024 14:36:17 -0500 Subject: [PATCH 13/23] Update transient WebView2 reference to 1.0.2730-prerelease --- tooling | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tooling b/tooling index 336ef4c2..236955ce 160000 --- a/tooling +++ b/tooling @@ -1 +1 @@ -Subproject commit 336ef4c2385d8357453f80bffad826ef5a2742ce +Subproject commit 236955ceab4947e6c9df8d2493b23e160750078b From cb8bbaa220616ad43969699aafd98f147045982f Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Wed, 14 Aug 2024 15:25:46 -0500 Subject: [PATCH 14/23] Fully qualify TextDecorations on WinUI 3 --- .../MarkdownTextBlock/src/TextElements/MyEmphasisInline.cs | 2 +- components/MarqueeText/src/MarqueeText.Properties.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/MarkdownTextBlock/src/TextElements/MyEmphasisInline.cs b/components/MarkdownTextBlock/src/TextElements/MyEmphasisInline.cs index eb88341e..eef14b96 100644 --- a/components/MarkdownTextBlock/src/TextElements/MyEmphasisInline.cs +++ b/components/MarkdownTextBlock/src/TextElements/MyEmphasisInline.cs @@ -69,7 +69,7 @@ internal class MyEmphasisInline : IAddChild public void SetStrikeThrough() { #if WINUI3 - _span.TextDecorations = TextDecorations.Strikethrough; + _span.TextDecorations = Windows.UI.Text.TextDecorations.Strikethrough; #elif WINUI2 _span.TextDecorations = Windows.UI.Text.TextDecorations.Strikethrough; #endif diff --git a/components/MarqueeText/src/MarqueeText.Properties.cs b/components/MarqueeText/src/MarqueeText.Properties.cs index 77212aea..b331e609 100644 --- a/components/MarqueeText/src/MarqueeText.Properties.cs +++ b/components/MarqueeText/src/MarqueeText.Properties.cs @@ -99,7 +99,7 @@ public partial class MarqueeText /// Gets or sets a value that indicates what decorations are applied to the text. /// #if WINUI3 - public TextDecorations TextDecorations + public Windows.UI.Text.TextDecorations TextDecorations #elif WINUI2 public Windows.UI.Text.TextDecorations TextDecorations #endif From e925ed1a49ad7d6a43caf6e32974b71d356ed6d4 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Thu, 15 Aug 2024 12:05:55 -0500 Subject: [PATCH 15/23] Revert WindowsSdkPackageVersion to 10.0.22621.37-preview for WindowsAppSDK 1.6 Preview1 --- tooling | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tooling b/tooling index 236955ce..2fcca69f 160000 --- a/tooling +++ b/tooling @@ -1 +1 @@ -Subproject commit 236955ceab4947e6c9df8d2493b23e160750078b +Subproject commit 2fcca69f3a1549109d2e2118fb9ea6ba6bb2515c From 25aded99a32fdb5f5d034c95c3a82bac5b57a512 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Fri, 16 Aug 2024 13:04:23 -0500 Subject: [PATCH 16/23] Update tooling with latest CsWinRT1028 fixes --- tooling | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tooling b/tooling index 2fcca69f..c3d33c30 160000 --- a/tooling +++ b/tooling @@ -1 +1 @@ -Subproject commit 2fcca69f3a1549109d2e2118fb9ea6ba6bb2515c +Subproject commit c3d33c3017fdc2c374a22d0a21c142acee3d5988 From 7955365cae4ca08ac76f8937ac870a3c25ac04dc Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Fri, 16 Aug 2024 14:00:06 -0500 Subject: [PATCH 17/23] Update tooling pointer --- tooling | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tooling b/tooling index c3d33c30..287689f8 160000 --- a/tooling +++ b/tooling @@ -1 +1 @@ -Subproject commit c3d33c3017fdc2c374a22d0a21c142acee3d5988 +Subproject commit 287689f861bb0cb812ce3523fb99c33092095830 From 2d37d7756a3128d7c29a0afc00458cdb13d53dcf Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Fri, 16 Aug 2024 18:00:12 -0500 Subject: [PATCH 18/23] Update tooling pointer --- tooling | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tooling b/tooling index 287689f8..4dbd18a0 160000 --- a/tooling +++ b/tooling @@ -1 +1 @@ -Subproject commit 287689f861bb0cb812ce3523fb99c33092095830 +Subproject commit 4dbd18a0b8167d29ddc71ce0b7c428ed4fc72ca2 From d0ac9b4a518cd8d71a7688d83826f60aa44cd8ec Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Mon, 19 Aug 2024 11:40:43 -0500 Subject: [PATCH 19/23] Remove clean task to resolve https://github.com/CommunityToolkit/Windows/pull/457#issuecomment-2294349146 --- tooling | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tooling b/tooling index 4dbd18a0..456673af 160000 --- a/tooling +++ b/tooling @@ -1 +1 @@ -Subproject commit 4dbd18a0b8167d29ddc71ce0b7c428ed4fc72ca2 +Subproject commit 456673af08328c59c4ab31c1b8d2312b492fdb52 From 6329817066bb4bbf3fcbe0a1881cd56c81da64c1 Mon Sep 17 00:00:00 2001 From: Arlo Date: Tue, 20 Aug 2024 17:36:33 -0500 Subject: [PATCH 20/23] Update build requirements in readme Updates the build requirements section of the repo README, bumping .NET 6 to 8 and adding the minimum Windows 10 Version the toolkit can be built on. Tested against: - Windows 10 Version 1809 Build 17763 - With net8, no Windows SDK (doesn't build) - With net8, Windows SDK 17763 (doesn't build uwp) - With net8, Windows SDK 17763 and 19041 (doesn't build uwp) - Windows 10 Version 21H1 Build 19043 - With net8, no Windows SDK (doesn't build) - With net8, Windows SDK 17763 (doesn't build uwp) - With net8, Windows SDK 17763 and 19041 (**builds uwp and wasdk**) --- ReadMe.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ReadMe.md b/ReadMe.md index 02220641..7aa2894a 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -32,9 +32,9 @@ git clone --recurse-submodules https://github.com/CommunityToolkit/Labs-Windows. ## Build Requirements - Visual Studio 2022 (UWP & Desktop Workloads for .NET) -- .NET 6 SDK -- Windows App SDK -- Windows SDK 19041 +- .NET 8 SDK +- Windows 10 SDK, version 2004 (10.0.19041.0) +- Windows 10 21H1 (Build 19043) or greater - Run `dotnet tool restore` from the project root to install SlnGen - Run build scripts from the [Developer Command Prompt for Visual Studio](https://learn.microsoft.com/visualstudio/ide/reference/command-prompt-powershell) or from elsewhere after adding `MSBuild.exe` to your PATH From 68a8339d533df4f122825300ad0da500a02d2733 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Wed, 21 Aug 2024 11:50:50 -0500 Subject: [PATCH 21/23] Update tooling pointer, see CommunityToolkit/Tooling-Windows-Submodule#207 --- tooling | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tooling b/tooling index fda081e1..028fe9c5 160000 --- a/tooling +++ b/tooling @@ -1 +1 @@ -Subproject commit fda081e11081ec7b0c034cdacbb817d906128b24 +Subproject commit 028fe9c50bd98d926bbed5d612668d753aa09b24 From 88dabefe4a28b662c9840a39ae68969038842f56 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Fri, 23 Aug 2024 12:21:22 -0500 Subject: [PATCH 22/23] Disabled RivePlayer tests on WindowsAppSDK. Track https://github.com/CommunityToolkit/Labs-Windows/issues/567 --- components/RivePlayer/tests/ExampleRivePlayerTestClass.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/RivePlayer/tests/ExampleRivePlayerTestClass.cs b/components/RivePlayer/tests/ExampleRivePlayerTestClass.cs index 7f5ea894..25cd4240 100644 --- a/components/RivePlayer/tests/ExampleRivePlayerTestClass.cs +++ b/components/RivePlayer/tests/ExampleRivePlayerTestClass.cs @@ -8,7 +8,11 @@ using CommunityToolkit.Labs.WinUI.Rive; namespace RivePlayerExperiment.Tests; +// Track https://github.com/CommunityToolkit/Labs-Windows/issues/567 +#if !WINDOWS_WINAPPSDK [TestClass] +#endif + public partial class ExampleRivePlayerTestClass : VisualUITestBase { // If you don't need access to UI objects directly or async code, use this pattern. From d346d3a1f278482f3b21e97c3e1edec2f3e5c92f Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Fri, 23 Aug 2024 13:52:41 -0500 Subject: [PATCH 23/23] Update tooling to latest main --- tooling | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tooling b/tooling index d19db7e5..df780af4 160000 --- a/tooling +++ b/tooling @@ -1 +1 @@ -Subproject commit d19db7e5aef6ad289219f8d01e1563746fc7f201 +Subproject commit df780af45016b43606f04d202255e37033402af5