Fixes #3918 and #3913 - Accepting behavior (#3921)

* Fixed #3905, #3918

* Tweaked Generic

* Label code cleanup

* Clean up.

* Clean up.

* Clean up2.
This commit is contained in:
Tig
2025-02-26 12:40:45 -07:00
committed by GitHub
parent 35522cc517
commit 7ba6d638bc
13 changed files with 194 additions and 23 deletions

View File

@@ -19,15 +19,19 @@ internal partial class LoginView : IRecipient<Message<LoginActions>>
{
ViewModel.Password = passwordInput.Text;
};
loginButton.Accepting += (_, _) =>
loginButton.Accepting += (_, e) =>
{
if (!ViewModel.CanLogin) { return; }
ViewModel.LoginCommand.Execute (null);
// Anytime Accepting is handled, make sure to set e.Cancel to false.
e.Cancel = false;
};
clearButton.Accepting += (_, _) =>
clearButton.Accepting += (_, e) =>
{
ViewModel.ClearCommand.Execute (null);
// Anytime Accepting is handled, make sure to set e.Cancel to false.
e.Cancel = false;
};
Initialized += (_, _) => { ViewModel.Initialized (); };