Esempio n. 1
0
        public MainWindow()
        {
            InitializeComponent();


            //1) Load in the Resource Dictionary which connects the Views to their View Models
            myresourcedictionary = new ResourceDictionary();
            System.Uri resourceLocater = new System.Uri("/HULK;component/Views/ResourceDictionary.xaml", System.UriKind.Relative);
            myresourcedictionary.Source = resourceLocater;

            //2) Load into Main Window the LoginScreen viewModel
            LoginScreenViewModel LoginScreenViewModel = new LoginScreenViewModel();

            Content          = LoginScreenViewModel;
            this.DataContext = Content;

            //3) Display the Login View in the Main Window.
            LoadView("Views/LoginScreen.xaml");
            this.Show();
        }
 public virtual void Login(LoginScreenViewModel viewModel) {
 }
Esempio n. 3
0
 public LoginScreen()
 {
     InitializeComponent();
     DataContext = new LoginScreenViewModel();
 }
 public virtual void InitializeLoginScreen(LoginScreenViewModel viewModel) {
     // This is called when a LoginScreenViewModel is created
     viewModel.Login.Action = this.LoginHandler;
     LoginScreenViewModelManager.Add(viewModel);
 }