How to use the rich pop-up prompt Windows phone

Recommended for you: Get network issues from WhatsUp Gold. Not end users.

. The following is the commonly used in several ways:

First, you need to add a reference to Coding4Fun.Phone.Controls.dll

Coding4Fun's official website:

1.ToastPrompt: Similar effect to toast push notification as, a message appears on the screen, and then disappear.

private void Toast_Click(object sender, RoutedEventArgs e) 
  { 
     var toast = new ToastPrompt
       { 
     Title = "Basic", 
     Message = ToastLongMsg, 
    }; 
     toast.Show(); 
  }

2.AboutPrompt: Show pop-up box, is characteristic of the popup in the middle of the screen, other pop-up box is at the top of the screen.

   private void About_Click(object sender, RoutedEventArgs e) 
 { 
  var about = new AboutPrompt(); 
  about.Completed += baseObject_Completed; 
  about.Show(); 
 } 

 void baseObject_Completed(object sender,PopUpEventArgs<object,   PopUpResult> e) 
 { 
  if (e.PopUpResult == PopUpResult.Ok) 
  MessageBox.Show("OK!"); 
  else if (e.PopUpResult == PopUpResult.Cancelled) 
  MessageBox.Show("CANCELLED!"); 
  else 
  MessageBox.Show("else?"); 
 }

3.PasswordInputPrompt: Enter the password for the pop-up box, enter the password information.

  private void Password_Click(object sender, RoutedEventArgs e) 
 { 
  var passwordInput = new PasswordInputPrompt 
  { 
  Title = "Basic Input", 
  Message = "I'm a basic input prompt", 
  }; 
  passwordInput.Completed += input_Completed; 

  passwordInput.Show(); 
 }

4.InputPrompt: Enter the pop-up box, used for t popup input box to input other information.

 private void Input_Click(object sender, RoutedEventArgs e) 
 { 
  var input = new InputPrompt 
  { 
  Title = "Basic Input", 
  Message = "I'm a basic input prompt", 
  }; 
  input.Completed += input_Completed; 

  input.Show(); 
 }

5.MessagePrompt: Message pop-up box, a common message pop-up box, similar to the system default MessageBox pop-up box.

 private void Message_Click(object sender, RoutedEventArgs e) 
 { 
  var messagePrompt = new MessagePrompt 
  { 
  Title = "Basic Message", 
  Message = "I'm a basic message prompt. ", 
  }; 
  messagePrompt.Completed += stringObject_Completed; 

  messagePrompt.Show(); 
 }
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download

Posted by Judy at December 30, 2013 - 2:14 PM