From 8d900ecbc64a0202370440a9a997bc1975c464f2 Mon Sep 17 00:00:00 2001 From: NaBian <836904362@qq.com> Date: Sat, 3 Jun 2023 13:45:09 +0800 Subject: [PATCH] fix: close #1407 --- .../Controls/Drawer/Drawer.cs | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/Shared/HandyControl_Shared/Controls/Drawer/Drawer.cs b/src/Shared/HandyControl_Shared/Controls/Drawer/Drawer.cs index eb973b3e..bd4b2c73 100644 --- a/src/Shared/HandyControl_Shared/Controls/Drawer/Drawer.cs +++ b/src/Shared/HandyControl_Shared/Controls/Drawer/Drawer.cs @@ -44,7 +44,6 @@ public class Drawer : FrameworkElement public Drawer() { Loaded += Drawer_Loaded; - Unloaded += Drawer_Unloaded; } private void Drawer_Loaded(object sender, RoutedEventArgs e) @@ -53,23 +52,8 @@ public class Drawer : FrameworkElement { OnIsOpenChanged(true); } - } - private void Drawer_Unloaded(object sender, RoutedEventArgs e) - { Loaded -= Drawer_Loaded; - - if (_maskElement != null) - { - _maskElement.PreviewMouseLeftButtonDown -= MaskElement_PreviewMouseLeftButtonDown; - } - - if (_storyboard != null) - { - _storyboard.Completed -= Storyboard_Completed; - } - - _container = null; } private static void DataContextPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) =>