using System.Windows; using System.Windows.Controls; using HC_APTBS.ViewModels.Dialogs; namespace HC_APTBS.Views.Dialogs { /// /// Authentication dialog that collects username and password before report generation. /// public partial class UserCheckDialog : Window { /// Creates the dialog and wires the ViewModel. public UserCheckDialog(UserCheckViewModel vm) { InitializeComponent(); DataContext = vm; vm.RequestClose += Close; } /// /// Forwards the PasswordBox value to the ViewModel. /// WPF intentionally does not expose Password as a DependencyProperty. /// private void OnPasswordChanged(object sender, RoutedEventArgs e) { if (DataContext is UserCheckViewModel vm) vm.Password = ((PasswordBox)sender).Password; } } }