diff --git a/src/Calculator/Views/StateTriggers/ControlSizeTrigger.cs b/src/Calculator/Views/StateTriggers/ControlSizeTrigger.cs index 505a4d22f..0b3fc4523 100644 --- a/src/Calculator/Views/StateTriggers/ControlSizeTrigger.cs +++ b/src/Calculator/Views/StateTriggers/ControlSizeTrigger.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. using System; @@ -49,21 +49,6 @@ public double MinWidth public static readonly DependencyProperty MinWidthProperty = DependencyProperty.Register(nameof(MinWidth), typeof(double), typeof(ControlSizeTrigger), new PropertyMetadata(-1)); - ~ControlSizeTrigger() - { - // CSHARP_MIGRATION: TODO: - // finalization will happen on a finalizer's thread. - // to prevent crashing the entire app, switch to UI thread to do unregistering work - Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => - { - UnregisterSizeChanged(Source); - }) - .AsTask() - .ConfigureAwait(false) - .GetAwaiter() - .GetResult(); - } - private void OnSourcePropertyChanged(FrameworkElement oldValue, FrameworkElement newValue) { UnregisterSizeChanged(oldValue);