From 3cfebae2c5ec2edd0b277e1e4de63bd7d9b61806 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Wed, 31 Jul 2024 17:42:22 -0500 Subject: [PATCH 01/48] Fixing CSWinRT1028 warnings, adding partials for AoT. --- .../Extensions/src/Markup/Abstract/TextIconExtension.cs | 8 -------- tooling | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/components/Extensions/src/Markup/Abstract/TextIconExtension.cs b/components/Extensions/src/Markup/Abstract/TextIconExtension.cs index c603cb3e..e342574b 100644 --- a/components/Extensions/src/Markup/Abstract/TextIconExtension.cs +++ b/components/Extensions/src/Markup/Abstract/TextIconExtension.cs @@ -34,20 +34,12 @@ protected static FontFamily SymbolThemeFontFamily /// /// Gets or sets the thickness of the icon glyph. /// - #if WINUI3 - public Windows.UI.Text.FontWeight FontWeight { get; set; } = Microsoft.UI.Text.FontWeights.Normal; - #elif WINUI2 public Windows.UI.Text.FontWeight FontWeight { get; set; } = Windows.UI.Text.FontWeights.Normal; - #endif /// /// Gets or sets the font style for the icon glyph. /// - #if WINUI3 public Windows.UI.Text.FontStyle FontStyle { get; set; } = Windows.UI.Text.FontStyle.Normal; - #elif WINUI2 - public Windows.UI.Text.FontStyle FontStyle { get; set; } = Windows.UI.Text.FontStyle.Normal; - #endif /// /// Gets or sets the foreground for the icon. diff --git a/tooling b/tooling index eccfbc88..ec68ac62 160000 --- a/tooling +++ b/tooling @@ -1 +1 @@ -Subproject commit eccfbc8827bbf2de5df74d14b0f828ba8e19a2a1 +Subproject commit ec68ac62588110f3a813131de962d832866bf0d8 From 2458c37794e58b2e0f5ce55be255dffca1679ae7 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Wed, 31 Jul 2024 17:57:55 -0500 Subject: [PATCH 02/48] Suppress internally generated error CsWinRT1028, add notes --- Directory.Build.props | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Directory.Build.props b/Directory.Build.props index 887804ab..fd8937ce 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -30,6 +30,17 @@ NU1901;NU1902;NU1903;NU1904 + $(NoWarn);TKSMPL0014; + + + $(NoWarn);CsWinRT1028; From 2a780799227249228c7749f6c0c07dc1e2d5c886 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Mon, 5 Aug 2024 13:03:08 -0500 Subject: [PATCH 03/48] Use preview version of Behaviors --- components/Behaviors/src/Dependencies.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/Behaviors/src/Dependencies.props b/components/Behaviors/src/Dependencies.props index 3f06d427..1c0237b1 100644 --- a/components/Behaviors/src/Dependencies.props +++ b/components/Behaviors/src/Dependencies.props @@ -11,7 +11,7 @@ - + From c29ae3f08349a28977a179c623b37e185c9ee46d Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Mon, 5 Aug 2024 13:03:45 -0500 Subject: [PATCH 04/48] Added compilation conditionals for missing Windows.UI.Xaml.Automation.ElementNotEnabledException --- .../src/TokenizingTextBoxAutomationPeer.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/components/TokenizingTextBox/src/TokenizingTextBoxAutomationPeer.cs b/components/TokenizingTextBox/src/TokenizingTextBoxAutomationPeer.cs index 8a9d1b87..e78f2450 100644 --- a/components/TokenizingTextBox/src/TokenizingTextBoxAutomationPeer.cs +++ b/components/TokenizingTextBox/src/TokenizingTextBoxAutomationPeer.cs @@ -52,7 +52,14 @@ public void SetValue(string value) { if (IsReadOnly) { - throw new ElementNotEnabledException($"Could not set the value of the {nameof(TokenizingTextBox)} "); + #if WINDOWS_UWP + #if NET8_0_OR_GREATER + // TODO: ElementNotEnabledException not available on modern uwp. + throw new Exception($"Could not set the value of the {nameof(TokenizingTextBox)} "); + #else + throw new Windows.UI.Xaml.Automation.ElementNotEnabledException($"Could not set the value of the {nameof(TokenizingTextBox)} "); + #endif + #endif } this.OwningTokenizingTextBox.Text = value; From e03855295d81cf98f3f2b890b73a9dcf7053c0ea Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Mon, 5 Aug 2024 13:03:57 -0500 Subject: [PATCH 05/48] Added compilation conditionals for missing Windows.UI.ColorHelper --- components/Converters/src/ColorToDisplayNameConverter.cs | 8 ++++---- docs | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) create mode 160000 docs diff --git a/components/Converters/src/ColorToDisplayNameConverter.cs b/components/Converters/src/ColorToDisplayNameConverter.cs index 6a22ff67..d12712ac 100644 --- a/components/Converters/src/ColorToDisplayNameConverter.cs +++ b/components/Converters/src/ColorToDisplayNameConverter.cs @@ -33,10 +33,10 @@ public object Convert( // Invalid color value provided return DependencyProperty.UnsetValue; } -#if HAS_UNO - // ColorHelper.ToDisplayName not yet supported on Uno Platform. - // Track https://github.com/unoplatform/uno/issues/18004 - return "Not supported"; + +#if WINDOWS_UWP && NET8_0_OR_GREATER + // Windows.UI.ColorHelper not yet supported on modern uwp. + return "Not supported" #elif WINUI2 return Windows.UI.ColorHelper.ToDisplayName(color); #elif WINUI3 diff --git a/docs b/docs new file mode 160000 index 00000000..0bbb0f87 --- /dev/null +++ b/docs @@ -0,0 +1 @@ +Subproject commit 0bbb0f87b21550a0900264500b0b8a37a419d2a0 From 76c5ac61f3e5c1f2398b1d364a9e679b85d5e2d0 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Mon, 5 Aug 2024 13:25:17 -0500 Subject: [PATCH 06/48] Use Microsoft.UI.Xaml.Automation.ElementNotEnabledException on modern uwp --- .../TokenizingTextBox/src/TokenizingTextBoxAutomationPeer.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/TokenizingTextBox/src/TokenizingTextBoxAutomationPeer.cs b/components/TokenizingTextBox/src/TokenizingTextBoxAutomationPeer.cs index e78f2450..333b2e1d 100644 --- a/components/TokenizingTextBox/src/TokenizingTextBoxAutomationPeer.cs +++ b/components/TokenizingTextBox/src/TokenizingTextBoxAutomationPeer.cs @@ -54,8 +54,7 @@ public void SetValue(string value) { #if WINDOWS_UWP #if NET8_0_OR_GREATER - // TODO: ElementNotEnabledException not available on modern uwp. - throw new Exception($"Could not set the value of the {nameof(TokenizingTextBox)} "); + throw new Microsoft.UI.Xaml.Automation.ElementNotEnabledException($"Could not set the value of the {nameof(TokenizingTextBox)} "); #else throw new Windows.UI.Xaml.Automation.ElementNotEnabledException($"Could not set the value of the {nameof(TokenizingTextBox)} "); #endif From 4652f217c4befc01a34fefbd55a22d27f680c44d Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Mon, 5 Aug 2024 13:32:48 -0500 Subject: [PATCH 07/48] Use color.ToString() as ToDisplayName replacement on modern uwp --- components/Converters/src/ColorToDisplayNameConverter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/Converters/src/ColorToDisplayNameConverter.cs b/components/Converters/src/ColorToDisplayNameConverter.cs index d12712ac..73e50830 100644 --- a/components/Converters/src/ColorToDisplayNameConverter.cs +++ b/components/Converters/src/ColorToDisplayNameConverter.cs @@ -36,7 +36,7 @@ public object Convert( #if WINDOWS_UWP && NET8_0_OR_GREATER // Windows.UI.ColorHelper not yet supported on modern uwp. - return "Not supported" + return color.ToString(); #elif WINUI2 return Windows.UI.ColorHelper.ToDisplayName(color); #elif WINUI3 From 038dde987148285b17136987e54a4c9af1110533 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Mon, 5 Aug 2024 13:33:14 -0500 Subject: [PATCH 08/48] Add source --- components/Converters/src/ColorToDisplayNameConverter.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/components/Converters/src/ColorToDisplayNameConverter.cs b/components/Converters/src/ColorToDisplayNameConverter.cs index 73e50830..5cdaf36f 100644 --- a/components/Converters/src/ColorToDisplayNameConverter.cs +++ b/components/Converters/src/ColorToDisplayNameConverter.cs @@ -36,6 +36,7 @@ public object Convert( #if WINDOWS_UWP && NET8_0_OR_GREATER // Windows.UI.ColorHelper not yet supported on modern uwp. + // Following advice from Sergio0694 return color.ToString(); #elif WINUI2 return Windows.UI.ColorHelper.ToDisplayName(color); From 27d180cfeb64f7ec65be77f8caea5ea3f3b5473f Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Fri, 9 Aug 2024 13:41:59 -0500 Subject: [PATCH 09/48] Fixing FontWeight and FontStyle namespaces --- .../Extensions/src/Markup/Abstract/TextIconExtension.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/components/Extensions/src/Markup/Abstract/TextIconExtension.cs b/components/Extensions/src/Markup/Abstract/TextIconExtension.cs index e342574b..5f7a44ea 100644 --- a/components/Extensions/src/Markup/Abstract/TextIconExtension.cs +++ b/components/Extensions/src/Markup/Abstract/TextIconExtension.cs @@ -34,12 +34,20 @@ protected static FontFamily SymbolThemeFontFamily /// /// Gets or sets the thickness of the icon glyph. /// + #if WINUI3 + public Windows.UI.Text.FontWeight FontWeight { get; set; } = Microsoft.UI.Text.FontWeights.Normal; + #elif WINUI2 public Windows.UI.Text.FontWeight FontWeight { get; set; } = Windows.UI.Text.FontWeights.Normal; + #endif /// /// Gets or sets the font style for the icon glyph. /// + #if WINUI3 public Windows.UI.Text.FontStyle FontStyle { get; set; } = Windows.UI.Text.FontStyle.Normal; + #elif WINUI2 + public Windows.UI.Text.FontWeight FontWeight { get; set; } = Windows.UI.Text.FontWeights.Normal; + #endif /// /// Gets or sets the foreground for the icon. From d25176be5326911107e8b0f0395b83b8ab766529 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Tue, 13 Aug 2024 17:06:08 -0500 Subject: [PATCH 10/48] Fixed bad property declaration --- components/Extensions/src/Markup/Abstract/TextIconExtension.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/Extensions/src/Markup/Abstract/TextIconExtension.cs b/components/Extensions/src/Markup/Abstract/TextIconExtension.cs index 5f7a44ea..c603cb3e 100644 --- a/components/Extensions/src/Markup/Abstract/TextIconExtension.cs +++ b/components/Extensions/src/Markup/Abstract/TextIconExtension.cs @@ -46,7 +46,7 @@ protected static FontFamily SymbolThemeFontFamily #if WINUI3 public Windows.UI.Text.FontStyle FontStyle { get; set; } = Windows.UI.Text.FontStyle.Normal; #elif WINUI2 - public Windows.UI.Text.FontWeight FontWeight { get; set; } = Windows.UI.Text.FontWeights.Normal; + public Windows.UI.Text.FontStyle FontStyle { get; set; } = Windows.UI.Text.FontStyle.Normal; #endif /// From 5be0a43caa4b436c96b420795e49c93aa53b5137 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Wed, 14 Aug 2024 11:48:49 -0500 Subject: [PATCH 11/48] Update Microsoft.WindowsAppSDK to 1.6.240807006-preview1, remove CsWinRT1028 suppression. --- Directory.Build.props | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index fd8937ce..7eb72bb7 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -31,16 +31,6 @@ NU1901;NU1902;NU1903;NU1904 $(NoWarn);TKSMPL0014; - - - $(NoWarn);CsWinRT1028; From 4bb92784c96d5bb95c761a6953562946286d2316 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Wed, 25 Sep 2024 11:37:15 -0500 Subject: [PATCH 12/48] Package updates and fixes for modern dotnet on uwp --- components/Behaviors/src/Dependencies.props | 2 +- .../Media/src/Effects/Extensions/AcrylicSourceExtension.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/Behaviors/src/Dependencies.props b/components/Behaviors/src/Dependencies.props index 1c0237b1..0551ab53 100644 --- a/components/Behaviors/src/Dependencies.props +++ b/components/Behaviors/src/Dependencies.props @@ -11,7 +11,7 @@ - + diff --git a/components/Media/src/Effects/Extensions/AcrylicSourceExtension.cs b/components/Media/src/Effects/Extensions/AcrylicSourceExtension.cs index cb555ab2..2ac3f955 100644 --- a/components/Media/src/Effects/Extensions/AcrylicSourceExtension.cs +++ b/components/Media/src/Effects/Extensions/AcrylicSourceExtension.cs @@ -14,7 +14,7 @@ namespace CommunityToolkit.WinUI.Media; /// /// This effect mirrors the look of the default implementation [MarkupExtensionReturnType(ReturnType = typeof(PipelineBuilder))] -public sealed class AcrylicSourceExtension : MarkupExtension +public sealed partial class AcrylicSourceExtension : MarkupExtension { /// /// Gets or sets the background source mode for the effect (the default is ). From 178a71e4d0bb491e69adab3d09430d84c6f0692c Mon Sep 17 00:00:00 2001 From: Arlo Date: Tue, 3 Dec 2024 16:04:12 -0600 Subject: [PATCH 13/48] Upgrade to latest Microsoft.Xaml.Behaviors.Uwp.Managed and Microsoft.UI.Xaml --- components/Behaviors/samples/InvokeActionsSample.xaml | 9 ++++----- .../Behaviors/samples/KeyDownTriggerBehaviorSample.xaml | 3 +-- .../Behaviors/samples/NavigateToUriActionSample.xaml | 5 ++--- .../Behaviors/samples/StartAnimationActivitySample.xaml | 5 ++--- components/Behaviors/src/Dependencies.props | 2 +- components/Media/samples/BlurEffectAnimationSample.xaml | 5 ++--- components/Media/samples/ColorEffectAnimationSample.xaml | 5 ++--- .../Media/samples/CrossFadeEffectAnimationSample.xaml | 5 ++--- components/Media/samples/EffectAnimationsSample.xaml | 5 ++--- .../Media/samples/ExposureEffectAnimationSample.xaml | 5 ++--- .../Media/samples/HueRotationEffectAnimationSample.xaml | 5 ++--- .../Media/samples/OpacityEffectAnimationSample.xaml | 5 ++--- .../Media/samples/SaturationEffectAnimationSample.xaml | 5 ++--- components/Media/samples/SepiaEffectAnimationSample.xaml | 5 ++--- nuget.config | 1 - 15 files changed, 28 insertions(+), 42 deletions(-) diff --git a/components/Behaviors/samples/InvokeActionsSample.xaml b/components/Behaviors/samples/InvokeActionsSample.xaml index 47f1e748..f85645fa 100644 --- a/components/Behaviors/samples/InvokeActionsSample.xaml +++ b/components/Behaviors/samples/InvokeActionsSample.xaml @@ -5,7 +5,6 @@ xmlns:ani="using:CommunityToolkit.WinUI.Animations" xmlns:behaviors="using:CommunityToolkit.WinUI.Behaviors" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" - xmlns:interactions="using:Microsoft.Xaml.Interactions.Core" xmlns:interactivity="using:Microsoft.Xaml.Interactivity" xmlns:local="using:BehaviorsExperiment.Samples" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" @@ -20,7 +19,7 @@ IsSequential="True"> - @@ -53,12 +52,12 @@ - - + - + diff --git a/components/Behaviors/samples/KeyDownTriggerBehaviorSample.xaml b/components/Behaviors/samples/KeyDownTriggerBehaviorSample.xaml index 9594ef02..4938c2dc 100644 --- a/components/Behaviors/samples/KeyDownTriggerBehaviorSample.xaml +++ b/components/Behaviors/samples/KeyDownTriggerBehaviorSample.xaml @@ -2,7 +2,6 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:behaviors="using:CommunityToolkit.WinUI.Behaviors" - xmlns:core="using:Microsoft.Xaml.Interactions.Core" xmlns:interactivity="using:Microsoft.Xaml.Interactivity"> - diff --git a/components/Behaviors/samples/NavigateToUriActionSample.xaml b/components/Behaviors/samples/NavigateToUriActionSample.xaml index 980a9d94..e6a3dd7c 100644 --- a/components/Behaviors/samples/NavigateToUriActionSample.xaml +++ b/components/Behaviors/samples/NavigateToUriActionSample.xaml @@ -2,14 +2,13 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:behaviors="using:CommunityToolkit.WinUI.Behaviors" - xmlns:core="using:Microsoft.Xaml.Interactions.Core" xmlns:interactivity="using:Microsoft.Xaml.Interactivity"> diff --git a/components/Behaviors/samples/StartAnimationActivitySample.xaml b/components/Behaviors/samples/StartAnimationActivitySample.xaml index cc850756..a349727f 100644 --- a/components/Behaviors/samples/StartAnimationActivitySample.xaml +++ b/components/Behaviors/samples/StartAnimationActivitySample.xaml @@ -5,7 +5,6 @@ xmlns:ani="using:CommunityToolkit.WinUI.Animations" xmlns:behaviors="using:CommunityToolkit.WinUI.Behaviors" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" - xmlns:interactions="using:Microsoft.Xaml.Interactions.Core" xmlns:interactivity="using:Microsoft.Xaml.Interactivity" xmlns:local="using:BehaviorsExperiment.Samples" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" @@ -55,9 +54,9 @@ - + - + diff --git a/components/Behaviors/src/Dependencies.props b/components/Behaviors/src/Dependencies.props index 0551ab53..46cbbee7 100644 --- a/components/Behaviors/src/Dependencies.props +++ b/components/Behaviors/src/Dependencies.props @@ -11,7 +11,7 @@ - + diff --git a/components/Media/samples/BlurEffectAnimationSample.xaml b/components/Media/samples/BlurEffectAnimationSample.xaml index f2abd267..b998e48d 100644 --- a/components/Media/samples/BlurEffectAnimationSample.xaml +++ b/components/Media/samples/BlurEffectAnimationSample.xaml @@ -3,7 +3,6 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:ani="using:CommunityToolkit.WinUI.Animations" xmlns:behaviors="using:CommunityToolkit.WinUI.Behaviors" - xmlns:interactions="using:Microsoft.Xaml.Interactions.Core" xmlns:interactivity="using:Microsoft.Xaml.Interactivity" xmlns:media="using:CommunityToolkit.WinUI.Media"> @@ -38,9 +37,9 @@ - + - + diff --git a/components/Media/samples/ColorEffectAnimationSample.xaml b/components/Media/samples/ColorEffectAnimationSample.xaml index f5251dc8..6aad5cfc 100644 --- a/components/Media/samples/ColorEffectAnimationSample.xaml +++ b/components/Media/samples/ColorEffectAnimationSample.xaml @@ -3,7 +3,6 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:ani="using:CommunityToolkit.WinUI.Animations" xmlns:behaviors="using:CommunityToolkit.WinUI.Behaviors" - xmlns:interactions="using:Microsoft.Xaml.Interactions.Core" xmlns:interactivity="using:Microsoft.Xaml.Interactivity" xmlns:media="using:CommunityToolkit.WinUI.Media"> @@ -38,9 +37,9 @@ - + - + diff --git a/components/Media/samples/CrossFadeEffectAnimationSample.xaml b/components/Media/samples/CrossFadeEffectAnimationSample.xaml index ecb49439..d31013b9 100644 --- a/components/Media/samples/CrossFadeEffectAnimationSample.xaml +++ b/components/Media/samples/CrossFadeEffectAnimationSample.xaml @@ -3,7 +3,6 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:ani="using:CommunityToolkit.WinUI.Animations" xmlns:behaviors="using:CommunityToolkit.WinUI.Behaviors" - xmlns:interactions="using:Microsoft.Xaml.Interactions.Core" xmlns:interactivity="using:Microsoft.Xaml.Interactivity" xmlns:media="using:CommunityToolkit.WinUI.Media"> @@ -43,9 +42,9 @@ - + - + diff --git a/components/Media/samples/EffectAnimationsSample.xaml b/components/Media/samples/EffectAnimationsSample.xaml index b6ad850e..56c1f7e7 100644 --- a/components/Media/samples/EffectAnimationsSample.xaml +++ b/components/Media/samples/EffectAnimationsSample.xaml @@ -3,7 +3,6 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:animations="using:CommunityToolkit.WinUI.Animations" xmlns:behaviors="using:CommunityToolkit.WinUI.Behaviors" - xmlns:interactions="using:Microsoft.Xaml.Interactions.Core" xmlns:interactivity="using:Microsoft.Xaml.Interactivity" xmlns:media="using:CommunityToolkit.WinUI.Media"> @@ -74,9 +73,9 @@ - + - + diff --git a/components/Media/samples/ExposureEffectAnimationSample.xaml b/components/Media/samples/ExposureEffectAnimationSample.xaml index df3f5661..6a40e928 100644 --- a/components/Media/samples/ExposureEffectAnimationSample.xaml +++ b/components/Media/samples/ExposureEffectAnimationSample.xaml @@ -3,7 +3,6 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:ani="using:CommunityToolkit.WinUI.Animations" xmlns:behaviors="using:CommunityToolkit.WinUI.Behaviors" - xmlns:interactions="using:Microsoft.Xaml.Interactions.Core" xmlns:interactivity="using:Microsoft.Xaml.Interactivity" xmlns:media="using:CommunityToolkit.WinUI.Media"> @@ -39,9 +38,9 @@ - + - + diff --git a/components/Media/samples/HueRotationEffectAnimationSample.xaml b/components/Media/samples/HueRotationEffectAnimationSample.xaml index b10ecdb5..f31e89e4 100644 --- a/components/Media/samples/HueRotationEffectAnimationSample.xaml +++ b/components/Media/samples/HueRotationEffectAnimationSample.xaml @@ -3,7 +3,6 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:ani="using:CommunityToolkit.WinUI.Animations" xmlns:behaviors="using:CommunityToolkit.WinUI.Behaviors" - xmlns:interactions="using:Microsoft.Xaml.Interactions.Core" xmlns:interactivity="using:Microsoft.Xaml.Interactivity" xmlns:media="using:CommunityToolkit.WinUI.Media"> @@ -39,9 +38,9 @@ - + - + diff --git a/components/Media/samples/OpacityEffectAnimationSample.xaml b/components/Media/samples/OpacityEffectAnimationSample.xaml index d992528b..5675ca73 100644 --- a/components/Media/samples/OpacityEffectAnimationSample.xaml +++ b/components/Media/samples/OpacityEffectAnimationSample.xaml @@ -3,7 +3,6 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:ani="using:CommunityToolkit.WinUI.Animations" xmlns:behaviors="using:CommunityToolkit.WinUI.Behaviors" - xmlns:interactions="using:Microsoft.Xaml.Interactions.Core" xmlns:interactivity="using:Microsoft.Xaml.Interactivity" xmlns:media="using:CommunityToolkit.WinUI.Media"> @@ -35,9 +34,9 @@ - + - + diff --git a/components/Media/samples/SaturationEffectAnimationSample.xaml b/components/Media/samples/SaturationEffectAnimationSample.xaml index 5c147dab..3f1cfd9f 100644 --- a/components/Media/samples/SaturationEffectAnimationSample.xaml +++ b/components/Media/samples/SaturationEffectAnimationSample.xaml @@ -3,7 +3,6 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:ani="using:CommunityToolkit.WinUI.Animations" xmlns:behaviors="using:CommunityToolkit.WinUI.Behaviors" - xmlns:interactions="using:Microsoft.Xaml.Interactions.Core" xmlns:interactivity="using:Microsoft.Xaml.Interactivity" xmlns:media="using:CommunityToolkit.WinUI.Media"> @@ -38,9 +37,9 @@ - + - + diff --git a/components/Media/samples/SepiaEffectAnimationSample.xaml b/components/Media/samples/SepiaEffectAnimationSample.xaml index 22647581..dcb4c45e 100644 --- a/components/Media/samples/SepiaEffectAnimationSample.xaml +++ b/components/Media/samples/SepiaEffectAnimationSample.xaml @@ -3,7 +3,6 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:ani="using:CommunityToolkit.WinUI.Animations" xmlns:behaviors="using:CommunityToolkit.WinUI.Behaviors" - xmlns:interactions="using:Microsoft.Xaml.Interactions.Core" xmlns:interactivity="using:Microsoft.Xaml.Interactivity" xmlns:media="using:CommunityToolkit.WinUI.Media"> @@ -38,9 +37,9 @@ - + - + diff --git a/nuget.config b/nuget.config index c3f797ff..69f89a39 100644 --- a/nuget.config +++ b/nuget.config @@ -1,6 +1,5 @@ - From 410ff81dae07a59f934f27129f2919f499c04b64 Mon Sep 17 00:00:00 2001 From: Arlo Date: Tue, 3 Dec 2024 21:28:55 -0600 Subject: [PATCH 14/48] Add nullability annotations to converter and extension methods --- .../src/ResourceNameToResourceStringConverter.cs | 9 +++++---- .../Extensions/src/Text/StringExtensions.Localization.cs | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/components/Converters/src/ResourceNameToResourceStringConverter.cs b/components/Converters/src/ResourceNameToResourceStringConverter.cs index f8341eca..24227bb0 100644 --- a/components/Converters/src/ResourceNameToResourceStringConverter.cs +++ b/components/Converters/src/ResourceNameToResourceStringConverter.cs @@ -32,17 +32,18 @@ public sealed partial class ResourceNameToResourceStringConverter : IValueConver /// Optional parameter. Not used. /// The language of the conversion. /// The string corresponding to the resource name. - public object Convert(object value, Type targetType, object parameter, string language) + public object? Convert(object value, Type targetType, object parameter, string language) { - if (value == null) + var valueAsString = value?.ToString(); + if (valueAsString == null) { return string.Empty; } #if WINAPPSDK && !HAS_UNO - return _resourceManager.MainResourceMap.TryGetValue(value.ToString()).ValueAsString; + return _resourceManager.MainResourceMap.TryGetValue(valueAsString).ValueAsString; #else - return _resourceLoader.GetString(value.ToString()); + return _resourceLoader.GetString(valueAsString); #endif } diff --git a/components/Extensions/src/Text/StringExtensions.Localization.cs b/components/Extensions/src/Text/StringExtensions.Localization.cs index 080f238d..6f784125 100644 --- a/components/Extensions/src/Text/StringExtensions.Localization.cs +++ b/components/Extensions/src/Text/StringExtensions.Localization.cs @@ -49,7 +49,7 @@ static StringExtensions() /// You can retrieve this from a UIElement.UIContext, XamlRoot.UIContext (XamlIslands), or Window.UIContext. /// string value for given resource or empty string if not found. ////[SupportedOSPlatform("Windows10.0.18362.0")] - public static string GetViewLocalized(this string resourceKey, UIContext? uiContext = null) + public static string? GetViewLocalized(this string resourceKey, UIContext? uiContext = null) { if (uiContext != null) { From 2fdbdb8aef10ea08248715dce9a10f77f7cdf58a Mon Sep 17 00:00:00 2001 From: Arlo Date: Wed, 4 Dec 2024 12:02:40 -0600 Subject: [PATCH 15/48] Update package references for Uno.Microsoft.Xaml.Behaviors to version 3.0.0-dev.17.g7c09b9114d --- components/Behaviors/src/Dependencies.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/Behaviors/src/Dependencies.props b/components/Behaviors/src/Dependencies.props index 46cbbee7..1a17f2c4 100644 --- a/components/Behaviors/src/Dependencies.props +++ b/components/Behaviors/src/Dependencies.props @@ -16,7 +16,7 @@ - + @@ -26,6 +26,6 @@ - + From a7e3f92ff48bcbfc7a4709703b64359bee074cac Mon Sep 17 00:00:00 2001 From: Arlo Date: Thu, 5 Dec 2024 16:36:08 -0600 Subject: [PATCH 16/48] Update SDK version to 9.0.101 in global.json --- global.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global.json b/global.json index 91187a7c..27a18775 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "8.0.403", + "version": "9.0.101", "rollForward": "latestFeature" }, "msbuild-sdks": From f865556565e34e50841a2eef5b8b036a1463714d Mon Sep 17 00:00:00 2001 From: Arlo Date: Thu, 12 Dec 2024 17:23:50 -0600 Subject: [PATCH 17/48] Update tooling with latest fixes, update behaviors --- components/Behaviors/src/Dependencies.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/Behaviors/src/Dependencies.props b/components/Behaviors/src/Dependencies.props index 1a17f2c4..c6da10ee 100644 --- a/components/Behaviors/src/Dependencies.props +++ b/components/Behaviors/src/Dependencies.props @@ -11,7 +11,7 @@ - + @@ -21,7 +21,7 @@ - + From 8da3e93ab089e1917a6d195e7275945c4727f937 Mon Sep 17 00:00:00 2001 From: Arlo Date: Fri, 13 Dec 2024 17:17:51 -0600 Subject: [PATCH 18/48] Delete docs submodule --- docs | 1 - 1 file changed, 1 deletion(-) delete mode 160000 docs diff --git a/docs b/docs deleted file mode 160000 index 0bbb0f87..00000000 --- a/docs +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0bbb0f87b21550a0900264500b0b8a37a419d2a0 From da89288d4b779e487979b87f47f09c90f419ea42 Mon Sep 17 00:00:00 2001 From: Arlo Date: Fri, 13 Dec 2024 17:31:14 -0600 Subject: [PATCH 19/48] Ran XAML styler --- components/Behaviors/samples/InvokeActionsSample.xaml | 10 +++++----- .../samples/KeyDownTriggerBehaviorSample.xaml | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/components/Behaviors/samples/InvokeActionsSample.xaml b/components/Behaviors/samples/InvokeActionsSample.xaml index f85645fa..9bad2da2 100644 --- a/components/Behaviors/samples/InvokeActionsSample.xaml +++ b/components/Behaviors/samples/InvokeActionsSample.xaml @@ -1,4 +1,4 @@ - + + TargetObject="{Binding ElementName=MyText}" + Value="Purple" /> + TargetObject="{Binding ElementName=MyText}" + Value="White" /> diff --git a/components/Behaviors/samples/KeyDownTriggerBehaviorSample.xaml b/components/Behaviors/samples/KeyDownTriggerBehaviorSample.xaml index 4938c2dc..40a347c6 100644 --- a/components/Behaviors/samples/KeyDownTriggerBehaviorSample.xaml +++ b/components/Behaviors/samples/KeyDownTriggerBehaviorSample.xaml @@ -10,7 +10,7 @@ + TargetObject="{x:Bind}" /> From aa3776f77cb428823719123351d22d63d875aa7d Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Mon, 18 Nov 2024 14:44:59 -0600 Subject: [PATCH 20/48] Upgrade to .NET 9.0 in Dockerfile, devcontainer.json, build.yml, and global.json --- .devcontainer/Dockerfile | 2 +- .devcontainer/devcontainer.json | 2 +- .github/workflows/build.yml | 4 +--- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 34ace61b..6935449f 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,5 +1,5 @@ # See https://github.com/devcontainers/images/tree/main/src/dotnet for image choices -FROM mcr.microsoft.com/vscode/devcontainers/dotnet:8.0 +FROM mcr.microsoft.com/vscode/devcontainers/dotnet:9.0 # [Choice] Node.js version: none, lts/*, 16, 14, 12, 10 ARG NODE_VERSION="none" diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 61655025..da7c1a47 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -7,7 +7,7 @@ "args": { // Update 'VARIANT' to pick a .NET Core version: 3.1, 5.0, 6.0 // Append -bullseye or -focal to pin to an OS version. - "VARIANT": "8.0", + "VARIANT": "9.0", // Options "NODE_VERSION": "lts/*" } diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 54d68e9e..1d6e32e0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,9 +17,7 @@ on: merge_group: env: - DOTNET_VERSION: ${{ '8.0.201' }} - DOTNET_INSTALL_DIR: dotnet-install - DOTNET_ROOT: dotnet-install + DOTNET_VERSION: ${{ '9.0.100' }} ENABLE_DIAGNOSTICS: true MSBUILD_VERBOSITY: normal #COREHOST_TRACE: 1 From a91bdf819b358633802b67f0005dd334dfa9d2a3 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Mon, 18 Nov 2024 14:45:09 -0600 Subject: [PATCH 21/48] Fix null reference by returning empty string for missing localization resources --- .../Extensions/src/Text/StringExtensions.Localization.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/Extensions/src/Text/StringExtensions.Localization.cs b/components/Extensions/src/Text/StringExtensions.Localization.cs index 6f784125..fb6a6f7b 100644 --- a/components/Extensions/src/Text/StringExtensions.Localization.cs +++ b/components/Extensions/src/Text/StringExtensions.Localization.cs @@ -54,11 +54,11 @@ static StringExtensions() if (uiContext != null) { var resourceLoader = ResourceLoader.GetForUIContext(uiContext); - return resourceLoader.GetString(resourceKey); + return resourceLoader?.GetString(resourceKey) ?? string.Empty; } else { - return ResourceLoader.GetForCurrentView().GetString(resourceKey); + return ResourceLoader.GetForCurrentView().GetString(resourceKey) ?? string.Empty; } } #endif From 4ea0d309c1501f3d18a5705cc3ca3ff2f84af79f Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Mon, 18 Nov 2024 14:54:26 -0600 Subject: [PATCH 22/48] Improved null value handling, fixes net9.0 errors --- .../src/ResourceNameToResourceStringConverter.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/Converters/src/ResourceNameToResourceStringConverter.cs b/components/Converters/src/ResourceNameToResourceStringConverter.cs index 24227bb0..e2c995e6 100644 --- a/components/Converters/src/ResourceNameToResourceStringConverter.cs +++ b/components/Converters/src/ResourceNameToResourceStringConverter.cs @@ -34,16 +34,16 @@ public sealed partial class ResourceNameToResourceStringConverter : IValueConver /// The string corresponding to the resource name. public object? Convert(object value, Type targetType, object parameter, string language) { - var valueAsString = value?.ToString(); - if (valueAsString == null) + var stringValue = value?.ToString(); + if (stringValue is null) { return string.Empty; } #if WINAPPSDK && !HAS_UNO - return _resourceManager.MainResourceMap.TryGetValue(valueAsString).ValueAsString; + return _resourceManager.MainResourceMap.TryGetValue(stringValue).ValueAsString; #else - return _resourceLoader.GetString(valueAsString); + return _resourceLoader.GetString(stringValue) ?? string.Empty; #endif } From 918f7c0ea2ea41e5147793e876cf1e5944c644cf Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Fri, 22 Nov 2024 14:25:44 -0600 Subject: [PATCH 23/48] Update package versions, update tooling pointer --- Directory.Build.targets | 2 +- components/Media/src/Dependencies.props | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Directory.Build.targets b/Directory.Build.targets index e3c75c2c..4f8f2ee7 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -1,7 +1,7 @@ - + diff --git a/components/Media/src/Dependencies.props b/components/Media/src/Dependencies.props index 04c44f45..fad06d5e 100644 --- a/components/Media/src/Dependencies.props +++ b/components/Media/src/Dependencies.props @@ -12,7 +12,7 @@ - + From 0557cf554286c89973ac0e231544e77c23b1aece Mon Sep 17 00:00:00 2001 From: Arlo Date: Mon, 16 Dec 2024 11:51:20 -0600 Subject: [PATCH 24/48] Update GitHub Actions runner to use 'windows-latest' instead of 'windows-latest-large' --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1d6e32e0..2e2be410 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -57,7 +57,7 @@ jobs: # Build both Uno.UI/WinUI2/UWP and Uno.WinUI/WinUI3/WindowsAppSDK versions of our packages using a matrix build: needs: [Xaml-Style-Check] - runs-on: windows-latest-large + runs-on: windows-latest # See https://docs.github.com/actions/using-jobs/using-a-matrix-for-your-jobs strategy: From 62539cbfff42e6a71d805bcf3149461ceecb6457 Mon Sep 17 00:00:00 2001 From: Arlo Date: Mon, 16 Dec 2024 14:09:03 -0600 Subject: [PATCH 25/48] Use WinUI version of Uno Behaviors package where needed --- components/Behaviors/src/Dependencies.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/Behaviors/src/Dependencies.props b/components/Behaviors/src/Dependencies.props index c6da10ee..6bf15845 100644 --- a/components/Behaviors/src/Dependencies.props +++ b/components/Behaviors/src/Dependencies.props @@ -26,6 +26,6 @@ - + From 9f63d24fc2848bc39b796c6d467cc354b79cf83f Mon Sep 17 00:00:00 2001 From: Arlo Date: Mon, 16 Dec 2024 14:44:53 -0600 Subject: [PATCH 26/48] Fix AoT errors in FrameworkElementExtensions, update submodule --- .../src/Tree/FrameworkElementExtensions.LogicalTree.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/Extensions/src/Tree/FrameworkElementExtensions.LogicalTree.cs b/components/Extensions/src/Tree/FrameworkElementExtensions.LogicalTree.cs index 52d27723..2e1b9d51 100644 --- a/components/Extensions/src/Tree/FrameworkElementExtensions.LogicalTree.cs +++ b/components/Extensions/src/Tree/FrameworkElementExtensions.LogicalTree.cs @@ -6,6 +6,7 @@ using System.Collections.Generic; using System.Reflection; using CommunityToolkit.WinUI.Predicates; +using System.Diagnostics.CodeAnalysis; #nullable enable @@ -95,7 +96,7 @@ public static partial class FrameworkElementExtensions /// The root element. /// The predicatee to use to match the child nodes. /// The child that was found, or . - private static T? FindChild(this FrameworkElement element, ref TPredicate predicate) + private static T? FindChild([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties)] this FrameworkElement element, ref TPredicate predicate) where T : notnull, FrameworkElement where TPredicate : struct, IPredicate { @@ -662,7 +663,7 @@ public static IEnumerable FindParents(this FrameworkElement el /// /// The parent element. /// The retrieved content control, or if not available. - public static UIElement? GetContentControl(this FrameworkElement element) + public static UIElement? GetContentControl([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties)] this FrameworkElement element) { Type type = element.GetType(); TypeInfo? typeInfo = type.GetTypeInfo(); From 6fc45885aa8f8e9c3e74472eb528bcc6f9ccc48c Mon Sep 17 00:00:00 2001 From: Arlo Date: Mon, 16 Dec 2024 15:12:40 -0600 Subject: [PATCH 27/48] Revert "Fix AoT errors in FrameworkElementExtensions, update submodule" This reverts commit d5fa8ba309df1ec73ac167f3e603ff0cae27f496. --- .../src/Tree/FrameworkElementExtensions.LogicalTree.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/components/Extensions/src/Tree/FrameworkElementExtensions.LogicalTree.cs b/components/Extensions/src/Tree/FrameworkElementExtensions.LogicalTree.cs index 2e1b9d51..52d27723 100644 --- a/components/Extensions/src/Tree/FrameworkElementExtensions.LogicalTree.cs +++ b/components/Extensions/src/Tree/FrameworkElementExtensions.LogicalTree.cs @@ -6,7 +6,6 @@ using System.Collections.Generic; using System.Reflection; using CommunityToolkit.WinUI.Predicates; -using System.Diagnostics.CodeAnalysis; #nullable enable @@ -96,7 +95,7 @@ public static partial class FrameworkElementExtensions /// The root element. /// The predicatee to use to match the child nodes. /// The child that was found, or . - private static T? FindChild([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties)] this FrameworkElement element, ref TPredicate predicate) + private static T? FindChild(this FrameworkElement element, ref TPredicate predicate) where T : notnull, FrameworkElement where TPredicate : struct, IPredicate { @@ -663,7 +662,7 @@ public static IEnumerable FindParents(this FrameworkElement el /// /// The parent element. /// The retrieved content control, or if not available. - public static UIElement? GetContentControl([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties)] this FrameworkElement element) + public static UIElement? GetContentControl(this FrameworkElement element) { Type type = element.GetType(); TypeInfo? typeInfo = type.GetTypeInfo(); From 349753c7722597b165f25f120506224702e203de Mon Sep 17 00:00:00 2001 From: Arlo Date: Tue, 17 Dec 2024 11:59:30 -0600 Subject: [PATCH 28/48] Fix CA2022, Improve asynchronous reading of pixel buffer in ImageCropper --- .../ImageCropper/src/ImageCropper.Helpers.cs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/components/ImageCropper/src/ImageCropper.Helpers.cs b/components/ImageCropper/src/ImageCropper.Helpers.cs index 30166c77..280d31d7 100644 --- a/components/ImageCropper/src/ImageCropper.Helpers.cs +++ b/components/ImageCropper/src/ImageCropper.Helpers.cs @@ -36,7 +36,20 @@ private static async Task CropImageAsync(WriteableBitmap writeableBitmap, IRando using (var sourceStream = writeableBitmap.PixelBuffer.AsStream()) { var buffer = new byte[sourceStream.Length]; - await sourceStream.ReadAsync(buffer, 0, buffer.Length); + var pos = 0; + + while (pos < buffer.Length) + { + var remaining = buffer.Length - pos; + var read = await sourceStream.ReadAsync(buffer, pos, remaining); + if (read == 0) + { + break; + } + + pos += read; + } + var bitmapEncoder = await BitmapEncoder.CreateAsync(GetEncoderId(bitmapFileFormat), stream); bitmapEncoder.SetPixelData(BitmapPixelFormat.Bgra8, BitmapAlphaMode.Premultiplied, (uint)writeableBitmap.PixelWidth, (uint)writeableBitmap.PixelHeight, 96.0, 96.0, buffer); bitmapEncoder.BitmapTransform.Bounds = new BitmapBounds From 2204fc4df6415f7ef45955cce32c5c05be3cd522 Mon Sep 17 00:00:00 2001 From: Arlo Date: Tue, 17 Dec 2024 11:59:53 -0600 Subject: [PATCH 29/48] Fix CS8622, Add nullability annotations to event handler parameters --- .../CameraPreview/samples/CameraPreviewSample.xaml.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/components/CameraPreview/samples/CameraPreviewSample.xaml.cs b/components/CameraPreview/samples/CameraPreviewSample.xaml.cs index d2750aaa..36964192 100644 --- a/components/CameraPreview/samples/CameraPreviewSample.xaml.cs +++ b/components/CameraPreview/samples/CameraPreviewSample.xaml.cs @@ -92,7 +92,7 @@ protected async override void OnNavigatedFrom(NavigationEventArgs e) await CleanUpAsync(); } - private async void Application_Suspending(object sender, SuspendingEventArgs e) + private async void Application_Suspending(object? sender, SuspendingEventArgs e) { if (Frame?.CurrentSourcePageType == typeof(CameraPreviewSample)) { @@ -102,7 +102,7 @@ private async void Application_Suspending(object sender, SuspendingEventArgs e) } } - private async void Application_Resuming(object sender, object e) + private async void Application_Resuming(object? sender, object e) { if (CameraPreviewControl != null) { @@ -113,19 +113,19 @@ private async void Application_Resuming(object sender, object e) } } - private void CameraPreviewControl_FrameArrived(object sender, FrameEventArgs e) + private void CameraPreviewControl_FrameArrived(object? sender, FrameEventArgs e) { _currentVideoFrame = e.VideoFrame; } - private void CameraPreviewControl_PreviewFailed(object sender, PreviewFailedEventArgs e) + private void CameraPreviewControl_PreviewFailed(object? sender, PreviewFailedEventArgs e) { ErrorBar.Message = e.Error; ErrorBar.IsOpen = true; } - private async void CaptureButton_Click(object sender, RoutedEventArgs e) + private async void CaptureButton_Click(object? sender, RoutedEventArgs e) { var softwareBitmap = _currentVideoFrame?.SoftwareBitmap; From 522c2ebdd098cc8c730b755889f7cb2484384ae1 Mon Sep 17 00:00:00 2001 From: Arlo Date: Tue, 17 Dec 2024 12:03:27 -0600 Subject: [PATCH 30/48] Add suppression message for trimming warning in GetContentControl method --- .../src/Tree/FrameworkElementExtensions.LogicalTree.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/components/Extensions/src/Tree/FrameworkElementExtensions.LogicalTree.cs b/components/Extensions/src/Tree/FrameworkElementExtensions.LogicalTree.cs index 52d27723..75897ce0 100644 --- a/components/Extensions/src/Tree/FrameworkElementExtensions.LogicalTree.cs +++ b/components/Extensions/src/Tree/FrameworkElementExtensions.LogicalTree.cs @@ -662,6 +662,7 @@ public static IEnumerable FindParents(this FrameworkElement el /// /// The parent element. /// The retrieved content control, or if not available. + [System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2075", Justification = "This method is currently not safe for trimming, and annotations here wouldn't help.")] public static UIElement? GetContentControl(this FrameworkElement element) { Type type = element.GetType(); From 76e7eb8af73a374dc070f484c6e685d1a8843fb3 Mon Sep 17 00:00:00 2001 From: Arlo Date: Tue, 17 Dec 2024 12:30:49 -0600 Subject: [PATCH 31/48] Only enable suppression message for trimming warning in GetContentControl method in .NET 8.0 or greater --- .../src/Tree/FrameworkElementExtensions.LogicalTree.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/Extensions/src/Tree/FrameworkElementExtensions.LogicalTree.cs b/components/Extensions/src/Tree/FrameworkElementExtensions.LogicalTree.cs index 75897ce0..2ffaba73 100644 --- a/components/Extensions/src/Tree/FrameworkElementExtensions.LogicalTree.cs +++ b/components/Extensions/src/Tree/FrameworkElementExtensions.LogicalTree.cs @@ -662,7 +662,9 @@ public static IEnumerable FindParents(this FrameworkElement el /// /// The parent element. /// The retrieved content control, or if not available. + #if NET8_0_OR_GREATER [System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2075", Justification = "This method is currently not safe for trimming, and annotations here wouldn't help.")] + #endif public static UIElement? GetContentControl(this FrameworkElement element) { Type type = element.GetType(); From 1b4eb9b20f599606dfb635a9debbed9826d69743 Mon Sep 17 00:00:00 2001 From: Arlo Date: Tue, 17 Dec 2024 13:20:50 -0600 Subject: [PATCH 32/48] Suppress IL2059 warning due to known platform issue in ColorPicker project --- ...CommunityToolkit.WinUI.Controls.ColorPicker.csproj | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/components/ColorPicker/src/CommunityToolkit.WinUI.Controls.ColorPicker.csproj b/components/ColorPicker/src/CommunityToolkit.WinUI.Controls.ColorPicker.csproj index 3c685394..b5a8e663 100644 --- a/components/ColorPicker/src/CommunityToolkit.WinUI.Controls.ColorPicker.csproj +++ b/components/ColorPicker/src/CommunityToolkit.WinUI.Controls.ColorPicker.csproj @@ -30,4 +30,15 @@ <_LayoutFile Remove="@(_LayoutFile)" Condition="$([System.String]::Copy("%(_LayoutFile.TargetPath)").StartsWith('CommunityToolkit.WinUI.Controls.Segmented\'))" /> + + + + $(NoWarn)IL2059; + From 27e4fb14499bb8f22c1ad51e01d724da4db5ac55 Mon Sep 17 00:00:00 2001 From: Arlo Date: Tue, 17 Dec 2024 13:43:16 -0600 Subject: [PATCH 33/48] Change Truth method visibility from public to private in ColorPicker component --- components/ColorPicker/src/ColorPicker.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/ColorPicker/src/ColorPicker.cs b/components/ColorPicker/src/ColorPicker.cs index eb5e0690..a9f0677c 100644 --- a/components/ColorPicker/src/ColorPicker.cs +++ b/components/ColorPicker/src/ColorPicker.cs @@ -358,7 +358,7 @@ private void UpdateVisualState(bool useTransitions = true) VisualStateManager.GoToState(this, (Truth(IsColorPaletteVisible, IsColorSpectrumVisible, IsColorChannelTextInputVisible) <= 1) ? "ColorPanelSelectorCollapsed" : "ColorPanelSelectorVisible", useTransitions); } - public static int Truth(params bool[] booleans) + private static int Truth(params bool[] booleans) { return booleans.Count(b => b); } From d90b87ee9379f0aeb636e1abcc867a9d2f819a5a Mon Sep 17 00:00:00 2001 From: Arlo Date: Tue, 17 Dec 2024 17:53:09 -0600 Subject: [PATCH 34/48] Fix compilation conditions for Wasdk --- .../src/TokenizingTextBoxAutomationPeer.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/components/TokenizingTextBox/src/TokenizingTextBoxAutomationPeer.cs b/components/TokenizingTextBox/src/TokenizingTextBoxAutomationPeer.cs index 333b2e1d..6bd8d0fd 100644 --- a/components/TokenizingTextBox/src/TokenizingTextBoxAutomationPeer.cs +++ b/components/TokenizingTextBox/src/TokenizingTextBoxAutomationPeer.cs @@ -52,13 +52,11 @@ public void SetValue(string value) { if (IsReadOnly) { - #if WINDOWS_UWP - #if NET8_0_OR_GREATER +#if NET8_0_OR_GREATER throw new Microsoft.UI.Xaml.Automation.ElementNotEnabledException($"Could not set the value of the {nameof(TokenizingTextBox)} "); - #else +#elif WINDOWS_UWP throw new Windows.UI.Xaml.Automation.ElementNotEnabledException($"Could not set the value of the {nameof(TokenizingTextBox)} "); - #endif - #endif +#endif } this.OwningTokenizingTextBox.Text = value; From 72331b2ad88138ae4264487789c9fbc8d1025124 Mon Sep 17 00:00:00 2001 From: Arlo Date: Tue, 17 Dec 2024 17:53:23 -0600 Subject: [PATCH 35/48] Cleanup and refactor TokenizingTextBox automation tests --- .../Test_TokenizingTextBox_AutomationPeer.cs | 24 +++++++++---------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/components/TokenizingTextBox/tests/Test_TokenizingTextBox_AutomationPeer.cs b/components/TokenizingTextBox/tests/Test_TokenizingTextBox_AutomationPeer.cs index 5b90b3fd..32094d58 100644 --- a/components/TokenizingTextBox/tests/Test_TokenizingTextBox_AutomationPeer.cs +++ b/components/TokenizingTextBox/tests/Test_TokenizingTextBox_AutomationPeer.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using CommunityToolkit.Tests; +using CommunityToolkit.Tooling.TestGen; using CommunityToolkit.WinUI.Automation.Peers; using CommunityToolkit.WinUI.Controls; @@ -10,7 +11,7 @@ namespace TokenizingTextBoxExperiment.Tests; [TestClass] [TestCategory("Test_TokenizingTextBox")] -public class Test_TokenizingTextBox_AutomationPeer : VisualUITestBase +public partial class Test_TokenizingTextBox_AutomationPeer : VisualUITestBase { [TestMethod] public async Task ShouldConfigureTokenizingTextBoxAutomationPeerAsync() @@ -83,24 +84,21 @@ await App.DispatcherQueue.EnqueueAsync(async () => }); } - [TestMethod] + [UIThreadTestMethod] public async Task ShouldThrowElementNotEnabledExceptionIfValueSetWhenDisabled() { - await App.DispatcherQueue.EnqueueAsync(async () => - { - const string expectedValue = "Wor"; + const string expectedValue = "Wor"; - var tokenizingTextBox = new TokenizingTextBox { IsEnabled = false }; + var tokenizingTextBox = new TokenizingTextBox { IsEnabled = false }; - await LoadTestContentAsync(tokenizingTextBox); + await LoadTestContentAsync(tokenizingTextBox); - var tokenizingTextBoxAutomationPeer = - FrameworkElementAutomationPeer.CreatePeerForElement(tokenizingTextBox) as TokenizingTextBoxAutomationPeer; + var tokenizingTextBoxAutomationPeer = + FrameworkElementAutomationPeer.CreatePeerForElement(tokenizingTextBox) as TokenizingTextBoxAutomationPeer; - Assert.ThrowsException(() => - { - tokenizingTextBoxAutomationPeer!.SetValue(expectedValue); - }); + Assert.ThrowsException(() => + { + tokenizingTextBoxAutomationPeer!.SetValue(expectedValue); }); } From f1546beeb917cce35047fd5a1fe457afd362e24b Mon Sep 17 00:00:00 2001 From: Arlo Date: Tue, 17 Dec 2024 18:04:51 -0600 Subject: [PATCH 36/48] Cleanup usings and compilation conditionals --- .../src/TokenizingTextBoxAutomationPeer.cs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/components/TokenizingTextBox/src/TokenizingTextBoxAutomationPeer.cs b/components/TokenizingTextBox/src/TokenizingTextBoxAutomationPeer.cs index 6bd8d0fd..ca2f30e4 100644 --- a/components/TokenizingTextBox/src/TokenizingTextBoxAutomationPeer.cs +++ b/components/TokenizingTextBox/src/TokenizingTextBoxAutomationPeer.cs @@ -3,9 +3,11 @@ // See the LICENSE file in the project root for more information. using CommunityToolkit.WinUI.Controls; -#if WINAPPSDK +#if WINUI3 +using Microsoft.UI.Xaml.Automation; using Microsoft.UI.Xaml.Automation.Provider; #else +using Windows.UI.Xaml.Automation; using Windows.UI.Xaml.Automation.Provider; #endif @@ -47,16 +49,12 @@ private TokenizingTextBox OwningTokenizingTextBox /// Sets the value of a control. /// The value to set. The provider is responsible for converting the value to the appropriate data type. - /// Thrown if the control is in a read-only state. + /// Thrown if the control is in a read-only state. public void SetValue(string value) { if (IsReadOnly) { -#if NET8_0_OR_GREATER - throw new Microsoft.UI.Xaml.Automation.ElementNotEnabledException($"Could not set the value of the {nameof(TokenizingTextBox)} "); -#elif WINDOWS_UWP - throw new Windows.UI.Xaml.Automation.ElementNotEnabledException($"Could not set the value of the {nameof(TokenizingTextBox)} "); -#endif + throw new ElementNotEnabledException($"Could not set the value of the {nameof(TokenizingTextBox)} "); } this.OwningTokenizingTextBox.Text = value; From 9d9c7f7b30a70547cc93077e38dd003796b947c6 Mon Sep 17 00:00:00 2001 From: Arlo Date: Wed, 18 Dec 2024 10:20:00 -0600 Subject: [PATCH 37/48] Update Microsoft.Xaml.Behaviors package references to version 3.0.0-preview2 --- components/Behaviors/src/Dependencies.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/Behaviors/src/Dependencies.props b/components/Behaviors/src/Dependencies.props index 6bf15845..0eb55f85 100644 --- a/components/Behaviors/src/Dependencies.props +++ b/components/Behaviors/src/Dependencies.props @@ -11,7 +11,7 @@ - + @@ -21,7 +21,7 @@ - + From 83c200443eb1ef216da21c77ea3b0c64f40d7d2e Mon Sep 17 00:00:00 2001 From: Arlo Date: Wed, 18 Dec 2024 13:17:18 -0600 Subject: [PATCH 38/48] Explicitly specify Platforms to build when packaging --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2e2be410..ebeb5b62 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -273,7 +273,7 @@ jobs: # Build and pack component nupkg - name: Build and pack component packages - run: ./tooling/Build-Toolkit-Components.ps1 -MultiTargets all -ExcludeMultiTargets ${{ env.EXCLUDED_MULTITARGETS }} -WinUIMajorVersion ${{ matrix.winui }} -DateForVersion ${{ env.VERSION_DATE }} ${{ env.VERSION_PROPERTY != '' && format('-PreviewVersion "{0}"', env.VERSION_PROPERTY) || '' }} ${{ env.ENABLE_DIAGNOSTICS == 'true' && '-EnableBinlogs' || '' }} ${{ env.ENABLE_DIAGNOSTICS == 'true' && '-Verbose' || '' }} -BinlogOutput ./ -NupkgOutput ./ -Release + run: ./tooling/Build-Toolkit-Components.ps1 -MultiTargets all -ExcludeMultiTargets ${{ env.EXCLUDED_MULTITARGETS }} -WinUIMajorVersion ${{ matrix.winui }} -DateForVersion ${{ env.VERSION_DATE }} ${{ env.VERSION_PROPERTY != '' && format('-PreviewVersion "{0}"', env.VERSION_PROPERTY) || '' }} ${{ env.ENABLE_DIAGNOSTICS == 'true' && '-EnableBinlogs' || '' }} ${{ env.ENABLE_DIAGNOSTICS == 'true' && '-Verbose' || '' }} -BinlogOutput ./ -NupkgOutput ./ -Release -AdditionalProperties @{ "Platforms" = "`"x86;x64;arm64;`"" } # Push Pull Request Packages to our DevOps Artifacts Feed (see nuget.config) - name: Push Pull Request Packages (if not fork) From 0f0fe59cf9d4ebb54f26565c6a0b65fe37ea2a3c Mon Sep 17 00:00:00 2001 From: Arlo Date: Wed, 18 Dec 2024 15:30:36 -0600 Subject: [PATCH 39/48] Use comma-delimited "Platform" property instead of semicolon-delimited "Platforms" --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ebeb5b62..3a002c9b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -273,7 +273,7 @@ jobs: # Build and pack component nupkg - name: Build and pack component packages - run: ./tooling/Build-Toolkit-Components.ps1 -MultiTargets all -ExcludeMultiTargets ${{ env.EXCLUDED_MULTITARGETS }} -WinUIMajorVersion ${{ matrix.winui }} -DateForVersion ${{ env.VERSION_DATE }} ${{ env.VERSION_PROPERTY != '' && format('-PreviewVersion "{0}"', env.VERSION_PROPERTY) || '' }} ${{ env.ENABLE_DIAGNOSTICS == 'true' && '-EnableBinlogs' || '' }} ${{ env.ENABLE_DIAGNOSTICS == 'true' && '-Verbose' || '' }} -BinlogOutput ./ -NupkgOutput ./ -Release -AdditionalProperties @{ "Platforms" = "`"x86;x64;arm64;`"" } + run: ./tooling/Build-Toolkit-Components.ps1 -MultiTargets all -ExcludeMultiTargets ${{ env.EXCLUDED_MULTITARGETS }} -WinUIMajorVersion ${{ matrix.winui }} -DateForVersion ${{ env.VERSION_DATE }} ${{ env.VERSION_PROPERTY != '' && format('-PreviewVersion "{0}"', env.VERSION_PROPERTY) || '' }} ${{ env.ENABLE_DIAGNOSTICS == 'true' && '-EnableBinlogs' || '' }} ${{ env.ENABLE_DIAGNOSTICS == 'true' && '-Verbose' || '' }} -BinlogOutput ./ -NupkgOutput ./ -Release -AdditionalProperties @{ "Platform" = "`"x86,x64,arm64`"" } # Push Pull Request Packages to our DevOps Artifacts Feed (see nuget.config) - name: Push Pull Request Packages (if not fork) From 354f591209421193cfd40b902b4a4e2d3ae89132 Mon Sep 17 00:00:00 2001 From: Arlo Date: Wed, 18 Dec 2024 16:40:37 -0600 Subject: [PATCH 40/48] Fixed an issue where building uwp/uap would result in Microsoft.VCLibs.Desktop error --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3a002c9b..2e2be410 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -273,7 +273,7 @@ jobs: # Build and pack component nupkg - name: Build and pack component packages - run: ./tooling/Build-Toolkit-Components.ps1 -MultiTargets all -ExcludeMultiTargets ${{ env.EXCLUDED_MULTITARGETS }} -WinUIMajorVersion ${{ matrix.winui }} -DateForVersion ${{ env.VERSION_DATE }} ${{ env.VERSION_PROPERTY != '' && format('-PreviewVersion "{0}"', env.VERSION_PROPERTY) || '' }} ${{ env.ENABLE_DIAGNOSTICS == 'true' && '-EnableBinlogs' || '' }} ${{ env.ENABLE_DIAGNOSTICS == 'true' && '-Verbose' || '' }} -BinlogOutput ./ -NupkgOutput ./ -Release -AdditionalProperties @{ "Platform" = "`"x86,x64,arm64`"" } + run: ./tooling/Build-Toolkit-Components.ps1 -MultiTargets all -ExcludeMultiTargets ${{ env.EXCLUDED_MULTITARGETS }} -WinUIMajorVersion ${{ matrix.winui }} -DateForVersion ${{ env.VERSION_DATE }} ${{ env.VERSION_PROPERTY != '' && format('-PreviewVersion "{0}"', env.VERSION_PROPERTY) || '' }} ${{ env.ENABLE_DIAGNOSTICS == 'true' && '-EnableBinlogs' || '' }} ${{ env.ENABLE_DIAGNOSTICS == 'true' && '-Verbose' || '' }} -BinlogOutput ./ -NupkgOutput ./ -Release # Push Pull Request Packages to our DevOps Artifacts Feed (see nuget.config) - name: Push Pull Request Packages (if not fork) From 46be8b85060f52c5bda67bf0f6408252452fc072 Mon Sep 17 00:00:00 2001 From: Arlo Date: Wed, 18 Dec 2024 18:00:52 -0600 Subject: [PATCH 41/48] Add workaround to prevent WebView2 from including Microsoft.VCLibs.Desktop in UAP builds --- Directory.Build.targets | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Directory.Build.targets b/Directory.Build.targets index 4f8f2ee7..deeb1665 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -1,4 +1,8 @@ + + + + From d54a7284d18bec113758c999338d02b23597cb07 Mon Sep 17 00:00:00 2001 From: Arlo Date: Fri, 20 Dec 2024 12:48:35 -0600 Subject: [PATCH 42/48] Add PullRequests package source to nuget.config --- nuget.config | 1 + 1 file changed, 1 insertion(+) diff --git a/nuget.config b/nuget.config index 69f89a39..83b653dc 100644 --- a/nuget.config +++ b/nuget.config @@ -1,6 +1,7 @@ + From 7fe4c98df20912bf6ed42139eb4fd2fbdceaeff5 Mon Sep 17 00:00:00 2001 From: Arlo Date: Fri, 20 Dec 2024 13:17:45 -0600 Subject: [PATCH 43/48] Update components/Extensions/src/Text/StringExtensions.Localization.cs Co-authored-by: Sergio Pedri --- components/Extensions/src/Text/StringExtensions.Localization.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/Extensions/src/Text/StringExtensions.Localization.cs b/components/Extensions/src/Text/StringExtensions.Localization.cs index fb6a6f7b..dd8866e4 100644 --- a/components/Extensions/src/Text/StringExtensions.Localization.cs +++ b/components/Extensions/src/Text/StringExtensions.Localization.cs @@ -54,7 +54,7 @@ static StringExtensions() if (uiContext != null) { var resourceLoader = ResourceLoader.GetForUIContext(uiContext); - return resourceLoader?.GetString(resourceKey) ?? string.Empty; + return resourceLoader.GetString(resourceKey); } else { From 2a54bf3f4b1adf698d03627a2daeee0aed159e6b Mon Sep 17 00:00:00 2001 From: Arlo Date: Fri, 20 Dec 2024 13:26:40 -0600 Subject: [PATCH 44/48] Update components/Extensions/src/Text/StringExtensions.Localization.cs Co-authored-by: Sergio Pedri --- components/Extensions/src/Text/StringExtensions.Localization.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/Extensions/src/Text/StringExtensions.Localization.cs b/components/Extensions/src/Text/StringExtensions.Localization.cs index dd8866e4..6f784125 100644 --- a/components/Extensions/src/Text/StringExtensions.Localization.cs +++ b/components/Extensions/src/Text/StringExtensions.Localization.cs @@ -58,7 +58,7 @@ static StringExtensions() } else { - return ResourceLoader.GetForCurrentView().GetString(resourceKey) ?? string.Empty; + return ResourceLoader.GetForCurrentView().GetString(resourceKey); } } #endif From 2e71d4d17222f22dadcfa488c46a2161c69e775e Mon Sep 17 00:00:00 2001 From: Arlo Date: Fri, 20 Dec 2024 13:26:50 -0600 Subject: [PATCH 45/48] Update components/Converters/src/ResourceNameToResourceStringConverter.cs Co-authored-by: Sergio Pedri --- .../Converters/src/ResourceNameToResourceStringConverter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/Converters/src/ResourceNameToResourceStringConverter.cs b/components/Converters/src/ResourceNameToResourceStringConverter.cs index e2c995e6..f93f9af1 100644 --- a/components/Converters/src/ResourceNameToResourceStringConverter.cs +++ b/components/Converters/src/ResourceNameToResourceStringConverter.cs @@ -43,7 +43,7 @@ public sealed partial class ResourceNameToResourceStringConverter : IValueConver #if WINAPPSDK && !HAS_UNO return _resourceManager.MainResourceMap.TryGetValue(stringValue).ValueAsString; #else - return _resourceLoader.GetString(stringValue) ?? string.Empty; + return _resourceLoader.GetString(valueAsString); #endif } From 812122014ece424cc083b2e2cf9f258967763281 Mon Sep 17 00:00:00 2001 From: Arlo Date: Fri, 20 Dec 2024 13:47:32 -0600 Subject: [PATCH 46/48] Fix syntax error --- .../Converters/src/ResourceNameToResourceStringConverter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/Converters/src/ResourceNameToResourceStringConverter.cs b/components/Converters/src/ResourceNameToResourceStringConverter.cs index f93f9af1..8be8182e 100644 --- a/components/Converters/src/ResourceNameToResourceStringConverter.cs +++ b/components/Converters/src/ResourceNameToResourceStringConverter.cs @@ -43,7 +43,7 @@ public sealed partial class ResourceNameToResourceStringConverter : IValueConver #if WINAPPSDK && !HAS_UNO return _resourceManager.MainResourceMap.TryGetValue(stringValue).ValueAsString; #else - return _resourceLoader.GetString(valueAsString); + return _resourceLoader.GetString(stringValue); #endif } From 252b041fcba729b18cdab2139efea469c0719888 Mon Sep 17 00:00:00 2001 From: Arlo Date: Fri, 20 Dec 2024 13:51:36 -0600 Subject: [PATCH 47/48] Use dynamic patch for DOTNET_VERSION --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2e2be410..f5b6a945 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,7 +17,7 @@ on: merge_group: env: - DOTNET_VERSION: ${{ '9.0.100' }} + DOTNET_VERSION: ${{ '9.0.x' }} ENABLE_DIAGNOSTICS: true MSBUILD_VERBOSITY: normal #COREHOST_TRACE: 1 From 2c0f9b3d8096fce836cd239a9c5cad3494e236f7 Mon Sep 17 00:00:00 2001 From: Arlo Date: Fri, 20 Dec 2024 16:45:41 -0600 Subject: [PATCH 48/48] Restore nuget.config to defaults --- nuget.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nuget.config b/nuget.config index 83b653dc..c3f797ff 100644 --- a/nuget.config +++ b/nuget.config @@ -1,7 +1,7 @@ + -