From 1237a58ad71417067b0f50b9a0281a68063ee26f Mon Sep 17 00:00:00 2001 From: Dmitriy Yukhanov Date: Tue, 5 Apr 2022 19:27:54 +0300 Subject: [PATCH] Remove InitializeComponent implementations Now, when Avalonia.NameGenerator package is included, InitializeComponent() implementations in code-behind does hides auto-generated InitializeComponent() which can cause different WTFs and confusion. so it should be removed. --- templates/csharp/usercontrol/NewUserControl.axaml.cs | 5 ----- templates/csharp/window/NewWindow.axaml.cs | 10 ---------- 2 files changed, 15 deletions(-) diff --git a/templates/csharp/usercontrol/NewUserControl.axaml.cs b/templates/csharp/usercontrol/NewUserControl.axaml.cs index ba891dd6..ff967526 100644 --- a/templates/csharp/usercontrol/NewUserControl.axaml.cs +++ b/templates/csharp/usercontrol/NewUserControl.axaml.cs @@ -10,10 +10,5 @@ public NewUserControl() { InitializeComponent(); } - - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); - } } } \ No newline at end of file diff --git a/templates/csharp/window/NewWindow.axaml.cs b/templates/csharp/window/NewWindow.axaml.cs index 931133b5..19342b48 100644 --- a/templates/csharp/window/NewWindow.axaml.cs +++ b/templates/csharp/window/NewWindow.axaml.cs @@ -9,16 +9,6 @@ public partial class NewWindow : Window public NewWindow() { InitializeComponent(); -//-:cnd:noEmit -#if DEBUG - this.AttachDevTools(); -#endif -//+:cnd:noEmit - } - - private void InitializeComponent() - { - AvaloniaXamlLoader.Load(this); } } } \ No newline at end of file