public void Execute(object parameter)
 {
     Contact c = (Contact)parameter;
     Messages MessagePage = new Messages(c);
     App.Current.MainWindow = MessagePage;
     MessagePage.Show();
 }
Exemplo n.º 2
0
        private void toMessages(object sender, RoutedEventArgs e)
        {
            var item = (sender as FrameworkElement).DataContext;
            int index = ContactListView.Items.IndexOf(item);

            int contactIndex = Contacts.ElementAt(index).UserId;

            Console.WriteLine("Index of item clicked messages: " + contactIndex);

            Messages newMessageWpf = new Messages(contactIndex);
            newMessageWpf.Show();
        }