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..f5b6a945 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.x' }} ENABLE_DIAGNOSTICS: true MSBUILD_VERBOSITY: normal #COREHOST_TRACE: 1 @@ -59,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: diff --git a/Directory.Build.props b/Directory.Build.props index 887804ab..7eb72bb7 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -30,6 +30,7 @@ NU1901;NU1902;NU1903;NU1904 + $(NoWarn);TKSMPL0014; diff --git a/Directory.Build.targets b/Directory.Build.targets index e3c75c2c..deeb1665 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -1,7 +1,11 @@ + + + + - + diff --git a/components/Behaviors/samples/InvokeActionsSample.xaml b/components/Behaviors/samples/InvokeActionsSample.xaml index 47f1e748..9bad2da2 100644 --- a/components/Behaviors/samples/InvokeActionsSample.xaml +++ b/components/Behaviors/samples/InvokeActionsSample.xaml @@ -1,11 +1,10 @@ - + - + - - + + - + diff --git a/components/Behaviors/samples/KeyDownTriggerBehaviorSample.xaml b/components/Behaviors/samples/KeyDownTriggerBehaviorSample.xaml index 9594ef02..40a347c6 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 3f06d427..0eb55f85 100644 --- a/components/Behaviors/src/Dependencies.props +++ b/components/Behaviors/src/Dependencies.props @@ -11,21 +11,21 @@ - + - + - + - + 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; 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); } 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; + diff --git a/components/Converters/src/ColorToDisplayNameConverter.cs b/components/Converters/src/ColorToDisplayNameConverter.cs index 6a22ff67..5cdaf36f 100644 --- a/components/Converters/src/ColorToDisplayNameConverter.cs +++ b/components/Converters/src/ColorToDisplayNameConverter.cs @@ -33,10 +33,11 @@ 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. + // Following advice from Sergio0694 + return color.ToString(); #elif WINUI2 return Windows.UI.ColorHelper.ToDisplayName(color); #elif WINUI3 diff --git a/components/Converters/src/ResourceNameToResourceStringConverter.cs b/components/Converters/src/ResourceNameToResourceStringConverter.cs index f8341eca..8be8182e 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 stringValue = value?.ToString(); + if (stringValue is null) { return string.Empty; } #if WINAPPSDK && !HAS_UNO - return _resourceManager.MainResourceMap.TryGetValue(value.ToString()).ValueAsString; + return _resourceManager.MainResourceMap.TryGetValue(stringValue).ValueAsString; #else - return _resourceLoader.GetString(value.ToString()); + return _resourceLoader.GetString(stringValue); #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) { diff --git a/components/Extensions/src/Tree/FrameworkElementExtensions.LogicalTree.cs b/components/Extensions/src/Tree/FrameworkElementExtensions.LogicalTree.cs index 52d27723..2ffaba73 100644 --- a/components/Extensions/src/Tree/FrameworkElementExtensions.LogicalTree.cs +++ b/components/Extensions/src/Tree/FrameworkElementExtensions.LogicalTree.cs @@ -662,6 +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(); 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 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/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 @@ - + 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 ). diff --git a/components/TokenizingTextBox/src/TokenizingTextBoxAutomationPeer.cs b/components/TokenizingTextBox/src/TokenizingTextBoxAutomationPeer.cs index 8a9d1b87..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,7 +49,7 @@ 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) 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); }); } 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": diff --git a/tooling b/tooling index eccfbc88..ec68ac62 160000 --- a/tooling +++ b/tooling @@ -1 +1 @@ -Subproject commit eccfbc8827bbf2de5df74d14b0f828ba8e19a2a1 +Subproject commit ec68ac62588110f3a813131de962d832866bf0d8