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(); }
public LoginWindow(AuthenticationViewModel viewModel) { ViewModel = viewModel; InitializeComponent(); }