private void Add_Complete(object sender, PopUpEventArgs <string, PopUpResult> e) { InputPrompt input = sender as InputPrompt; CardType card = PhoneApplicationService.Current.State["CurrentCard"] as CardType; if (e.PopUpResult == PopUpResult.Ok) { if (input.Value.Length > 0) { cardView.AddCommentToCard(card.ID, input.Value); } else { MessageBox.Show("Minimum comment character length is 1"); } } }