Ejemplo n.º 1
0
        protected override void OnStartup(StartupEventArgs e)
        {
            //Create a custom principal with an anonymous identity at startup
            CustomPrincipal customPrincipal = new CustomPrincipal();

            AppDomain.CurrentDomain.SetThreadPrincipal(customPrincipal);

            base.OnStartup(e);

            //Show the login view
            AuthenticationViewModel viewModel = new AuthenticationViewModel(new AuthenticationService());
            IView loginWindow = new LoginWindow(viewModel);

            loginWindow.Show();
        }
Ejemplo n.º 2
0
 public LoginWindow(AuthenticationViewModel viewModel)
 {
     ViewModel = viewModel;
     InitializeComponent();
 }