public void LaunchInviteWindow(ControlMessage msg) { InviteWindow inviteWin = new InviteWindow(msg.Sender, msg.ChatName, msg.Chat, msg.ID); this.BeginInvoke((MethodInvoker) delegate() { inviteWin.BringToFront(); inviteWin.Show(); }); }
public void CreateNewWindow(InviteViewModel inviteViewModel) { var window = new InviteWindow { DataContext = inviteViewModel }; window.ShowDialog(); }