diff options
Diffstat (limited to 'ModerationClient/Views/MainWindow/LoginView.axaml.cs')
-rw-r--r-- | ModerationClient/Views/MainWindow/LoginView.axaml.cs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/ModerationClient/Views/MainWindow/LoginView.axaml.cs b/ModerationClient/Views/MainWindow/LoginView.axaml.cs new file mode 100644 index 0000000..5e84ace --- /dev/null +++ b/ModerationClient/Views/MainWindow/LoginView.axaml.cs @@ -0,0 +1,18 @@ +using System; +using Avalonia.Controls; +using Avalonia.Interactivity; +using Avalonia.Markup.Xaml; +using ModerationClient.ViewModels; + +namespace ModerationClient.Views; + +public partial class LoginView : UserControl { + public LoginView() { + InitializeComponent(); + } + + // ReSharper disable once AsyncVoidMethod + private async void Login(object? _, RoutedEventArgs __) { + await (DataContext as LoginViewModel ?? throw new InvalidCastException("LoginView did not receive LoginViewModel?")).LoginAsync(); + } +} |