diff --git a/src/shared/Atlassian.Bitbucket/UI/Views/CredentialsView.axaml b/src/shared/Atlassian.Bitbucket/UI/Views/CredentialsView.axaml
index f74161a5c..717500b7b 100644
--- a/src/shared/Atlassian.Bitbucket/UI/Views/CredentialsView.axaml
+++ b/src/shared/Atlassian.Bitbucket/UI/Views/CredentialsView.axaml
@@ -29,7 +29,7 @@
Margin="0,10,0,0"/>
-
-
-
-
diff --git a/src/shared/Atlassian.Bitbucket/UI/Views/CredentialsView.axaml.cs b/src/shared/Atlassian.Bitbucket/UI/Views/CredentialsView.axaml.cs
index 89c0b172d..87e596b99 100644
--- a/src/shared/Atlassian.Bitbucket/UI/Views/CredentialsView.axaml.cs
+++ b/src/shared/Atlassian.Bitbucket/UI/Views/CredentialsView.axaml.cs
@@ -8,26 +8,11 @@ namespace Atlassian.Bitbucket.UI.Views
{
public partial class CredentialsView : UserControl, IFocusable
{
- private TabControl _tabControl;
- private Button _oauthLoginButton;
- private TextBox _userNameTextBox;
- private TextBox _passwordTextBox;
-
public CredentialsView()
{
InitializeComponent();
}
- private void InitializeComponent()
- {
- AvaloniaXamlLoader.Load(this);
-
- _tabControl = this.FindControl("authModesTabControl");
- _oauthLoginButton = this.FindControl
-
+
diff --git a/src/shared/Core/UI/Controls/DialogWindow.axaml.cs b/src/shared/Core/UI/Controls/DialogWindow.axaml.cs
index 79501edb8..b6bc4fcc4 100644
--- a/src/shared/Core/UI/Controls/DialogWindow.axaml.cs
+++ b/src/shared/Core/UI/Controls/DialogWindow.axaml.cs
@@ -12,7 +12,6 @@ namespace GitCredentialManager.UI.Controls
public partial class DialogWindow : Window
{
private readonly Control _view;
- private ContentControl _contentHolder;
public DialogWindow() : this(null)
{
@@ -22,20 +21,10 @@ public DialogWindow() : this(null)
public DialogWindow(Control view)
{
InitializeComponent();
-#if DEBUG
- this.AttachDevTools();
-#endif
_view = view;
_contentHolder.Content = _view;
}
- private void InitializeComponent()
- {
- AvaloniaXamlLoader.Load(this);
-
- _contentHolder = this.FindControl("contentHolder");
- }
-
protected override void OnDataContextChanged(EventArgs e)
{
if (DataContext is WindowViewModel vm)
diff --git a/src/shared/Core/UI/Controls/ProgressWindow.axaml.cs b/src/shared/Core/UI/Controls/ProgressWindow.axaml.cs
index 7dc46dac6..1e30b751f 100644
--- a/src/shared/Core/UI/Controls/ProgressWindow.axaml.cs
+++ b/src/shared/Core/UI/Controls/ProgressWindow.axaml.cs
@@ -14,11 +14,6 @@ public ProgressWindow()
InitializeComponent();
}
- private void InitializeComponent()
- {
- AvaloniaXamlLoader.Load(this);
- }
-
public static IntPtr ShowAndGetHandle(CancellationToken ct)
{
var tsc = new TaskCompletionSource();
diff --git a/src/shared/Core/UI/Views/CredentialsView.axaml b/src/shared/Core/UI/Views/CredentialsView.axaml
index 51659345f..9e85c4872 100644
--- a/src/shared/Core/UI/Views/CredentialsView.axaml
+++ b/src/shared/Core/UI/Views/CredentialsView.axaml
@@ -33,10 +33,10 @@
-
-
diff --git a/src/shared/Core/UI/Views/CredentialsView.axaml.cs b/src/shared/Core/UI/Views/CredentialsView.axaml.cs
index 8423176be..5ffb6e674 100644
--- a/src/shared/Core/UI/Views/CredentialsView.axaml.cs
+++ b/src/shared/Core/UI/Views/CredentialsView.axaml.cs
@@ -7,22 +7,11 @@ namespace GitCredentialManager.UI.Views
{
public partial class CredentialsView : UserControl, IFocusable
{
- private TextBox _userNameTextBox;
- private TextBox _passwordTextBox;
-
public CredentialsView()
{
InitializeComponent();
}
- private void InitializeComponent()
- {
- AvaloniaXamlLoader.Load(this);
-
- _userNameTextBox = this.FindControl("userNameTextBox");
- _passwordTextBox = this.FindControl("passwordTextBox");
- }
-
public void SetFocus()
{
if (!(DataContext is CredentialsViewModel vm))
diff --git a/src/shared/Core/UI/Views/DefaultAccountView.axaml.cs b/src/shared/Core/UI/Views/DefaultAccountView.axaml.cs
index 3593c0ddc..e1d22548f 100644
--- a/src/shared/Core/UI/Views/DefaultAccountView.axaml.cs
+++ b/src/shared/Core/UI/Views/DefaultAccountView.axaml.cs
@@ -9,10 +9,5 @@ public DefaultAccountView()
{
InitializeComponent();
}
-
- private void InitializeComponent()
- {
- AvaloniaXamlLoader.Load(this);
- }
}
}
diff --git a/src/shared/Core/UI/Views/DeviceCodeView.axaml.cs b/src/shared/Core/UI/Views/DeviceCodeView.axaml.cs
index 75b2858c2..630860a36 100644
--- a/src/shared/Core/UI/Views/DeviceCodeView.axaml.cs
+++ b/src/shared/Core/UI/Views/DeviceCodeView.axaml.cs
@@ -9,10 +9,5 @@ public DeviceCodeView()
{
InitializeComponent();
}
-
- private void InitializeComponent()
- {
- AvaloniaXamlLoader.Load(this);
- }
}
}
diff --git a/src/shared/Core/UI/Views/OAuthView.axaml.cs b/src/shared/Core/UI/Views/OAuthView.axaml.cs
index d07b2a458..4f01b27e0 100644
--- a/src/shared/Core/UI/Views/OAuthView.axaml.cs
+++ b/src/shared/Core/UI/Views/OAuthView.axaml.cs
@@ -9,10 +9,5 @@ public OAuthView()
{
InitializeComponent();
}
-
- private void InitializeComponent()
- {
- AvaloniaXamlLoader.Load(this);
- }
}
}
diff --git a/src/shared/GitHub/UI/Controls/HorizontalShadowDivider.axaml.cs b/src/shared/GitHub/UI/Controls/HorizontalShadowDivider.axaml.cs
index 5f1e7f7c5..5a7fc6ba3 100644
--- a/src/shared/GitHub/UI/Controls/HorizontalShadowDivider.axaml.cs
+++ b/src/shared/GitHub/UI/Controls/HorizontalShadowDivider.axaml.cs
@@ -9,10 +9,5 @@ public HorizontalShadowDivider()
{
InitializeComponent();
}
-
- private void InitializeComponent()
- {
- AvaloniaXamlLoader.Load(this);
- }
}
}
diff --git a/src/shared/GitHub/UI/Controls/SixDigitInput.axaml b/src/shared/GitHub/UI/Controls/SixDigitInput.axaml
index ceedbe9da..0f94006af 100644
--- a/src/shared/GitHub/UI/Controls/SixDigitInput.axaml
+++ b/src/shared/GitHub/UI/Controls/SixDigitInput.axaml
@@ -18,11 +18,11 @@
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/src/shared/GitHub/UI/Controls/SixDigitInput.axaml.cs b/src/shared/GitHub/UI/Controls/SixDigitInput.axaml.cs
index 524bc959e..e018232de 100644
--- a/src/shared/GitHub/UI/Controls/SixDigitInput.axaml.cs
+++ b/src/shared/GitHub/UI/Controls/SixDigitInput.axaml.cs
@@ -28,20 +28,15 @@ public partial class SixDigitInput : UserControl, IFocusable
public SixDigitInput()
{
InitializeComponent();
- }
-
- private void InitializeComponent()
- {
- AvaloniaXamlLoader.Load(this);
_textBoxes = new[]
{
- this.FindControl("one"),
- this.FindControl("two"),
- this.FindControl("three"),
- this.FindControl("four"),
- this.FindControl("five"),
- this.FindControl("six"),
+ _one,
+ _two,
+ _three,
+ _four,
+ _five,
+ _six,
};
foreach (TextBox textBox in _textBoxes)
diff --git a/src/shared/GitHub/UI/Views/CredentialsView.axaml b/src/shared/GitHub/UI/Views/CredentialsView.axaml
index ccf96bf7b..9ea6f3fb8 100644
--- a/src/shared/GitHub/UI/Views/CredentialsView.axaml
+++ b/src/shared/GitHub/UI/Views/CredentialsView.axaml
@@ -39,7 +39,7 @@
Classes="hyperlink"/>
-
@@ -62,7 +62,7 @@
-
-
-
@@ -103,10 +103,10 @@
-
-
diff --git a/src/shared/GitHub/UI/Views/CredentialsView.axaml.cs b/src/shared/GitHub/UI/Views/CredentialsView.axaml.cs
index b6a8a3b03..b50edf1b5 100644
--- a/src/shared/GitHub/UI/Views/CredentialsView.axaml.cs
+++ b/src/shared/GitHub/UI/Views/CredentialsView.axaml.cs
@@ -8,30 +8,11 @@ namespace GitHub.UI.Views
{
public partial class CredentialsView : UserControl, IFocusable
{
- private TabControl _tabControl;
- private Button _browserButton;
- private Button _deviceButton;
- private TextBox _tokenTextBox;
- private TextBox _userNameTextBox;
- private TextBox _passwordTextBox;
-
public CredentialsView()
{
InitializeComponent();
}
- private void InitializeComponent()
- {
- AvaloniaXamlLoader.Load(this);
-
- _tabControl = this.FindControl("authModesTabControl");
- _browserButton = this.FindControl