From dc84ea7edef1b76e9394c47943461bea33028e1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wies=C5=82aw=20=C5=A0olt=C3=A9s?= Date: Tue, 17 May 2022 10:32:43 +0200 Subject: [PATCH] Revert --- src/Avalonia.Controls/Window.cs | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/src/Avalonia.Controls/Window.cs b/src/Avalonia.Controls/Window.cs index 3a8a721eec..51ca91f5bf 100644 --- a/src/Avalonia.Controls/Window.cs +++ b/src/Avalonia.Controls/Window.cs @@ -172,13 +172,13 @@ namespace Avalonia.Controls /// Routed event that can be used for global tracking of window destruction /// public static readonly RoutedEvent WindowClosedEvent = - RoutedEvent.Register(nameof(WindowClosed), RoutingStrategies.Direct); + RoutedEvent.Register("WindowClosed", RoutingStrategies.Direct); /// /// Routed event that can be used for global tracking of opening windows /// public static readonly RoutedEvent WindowOpenedEvent = - RoutedEvent.Register(nameof(WindowOpened), RoutingStrategies.Direct); + RoutedEvent.Register("WindowOpened", RoutingStrategies.Direct); private readonly NameScope _nameScope = new NameScope(); @@ -445,24 +445,6 @@ namespace Avalonia.Controls } } - /// - /// Routed event that can be used for global tracking of window destruction. - /// - public event EventHandler? WindowClosed - { - add => AddHandler(WindowClosedEvent, value); - remove => RemoveHandler(WindowClosedEvent, value); - } - - /// - /// Routed event that can be used for global tracking of opening windows. - /// - public event EventHandler? WindowOpened - { - add => AddHandler(WindowOpenedEvent, value); - remove => RemoveHandler(WindowOpenedEvent, value); - } - /// /// Starts moving a window with left button being held. Should be called from left mouse button press event handler ///