Exemplo n.º 1
0
 public EnterName()
 {
     InitializeComponent();
     DataContext           = new EnterNameViewModel();
     Closing              += EnterName_Closing;
     WindowStartupLocation = WindowStartupLocation.CenterScreen;
 }
Exemplo n.º 2
0
        public EnterNameWindow(Result result, Examen examen)
        {
            InitializeComponent();
            var enterNameVM = new EnterNameViewModel(result, examen);

            DataContext = enterNameVM;
            enterNameVM.CloseHandler += (sender, args) => this.Close();
        }
Exemplo n.º 3
0
        private void EnterName_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            EnterNameViewModel enterNameViewModel = (EnterNameViewModel)DataContext;

            EnteredName = enterNameViewModel.Name;
        }