示例#1
0
        private async void OpenDetails(object sender, TappedRoutedEventArgs e)
        {
            UserViewModel     vm     = (UserViewModel)((StackPanel)sender).Tag;
            UserDetailsDialog dialog = new UserDetailsDialog(vm);

            Hide();
            dialog.ShowAsync();
        }
        private async void Request(ContentDialog sender, ContentDialogButtonClickEventArgs args)
        {
            string value = Email.Text;

            if (value.IsEmail())
            {
                base.Hide();
                UserViewModel user = await UserViewModel.FromEmail(value);

                UserDetailsDialog dialog = new UserDetailsDialog(user);
                dialog.ShowAsync();
            }
            else
            {
                if (args != null)
                {
                    args.Cancel = true;
                }
                Error.Text = "Not a valid email address";
            }
        }