private void CandidateBox_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { AnotherProfile newprofile = new AnotherProfile(user); newprofile.Show(); newprofile.Activate(); newprofile.Topmost = true; // important newprofile.Focus(); }
private void viewProfileBtn_Click(object sender, RoutedEventArgs e) { AnotherProfile recprofile = new AnotherProfile(vacancy.Recruiter.UserName); recprofile.Show(); recprofile.Activate(); recprofile.Topmost = true; recprofile.Focus(); }
private void senderLabel_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { LoginRegistrationControl lrc = LoginRegistrationControl.getInstance(); AnotherProfile newprofile; if (mail.SenderUserName == currentUser.UserName) { newprofile = new AnotherProfile(mail.ReceiverUserName); newprofile.Show(); newprofile.Activate(); newprofile.Topmost = true; // important newprofile.Focus(); } else if (mail.ReceiverUserName == currentUser.UserName) { newprofile = new AnotherProfile(mail.SenderUserName); newprofile.Show(); newprofile.Activate(); newprofile.Topmost = true; // important newprofile.Focus(); } }