private void browser_LoadCompleted(object sender, NavigationEventArgs e) { if (e.Uri.ToString() != "https://api.twitter.com/oauth/authorize") { return; } string verifier = GetVerifierFromPage(); TwitterHelper.Authenticate(this.requestToken, verifier); var mw = new MainWindow(); mw.ShowActivated = true; mw.Show(); this.Close(); }