How to use a variety of pop-up box prompts in Windows Phone

Source: Internet
Author: User

. The following are common methods:

First add reference coding4fun. Phone. Controls. dll

Coding4fun Official Website: http://coding4fun.codeplex.com/

1. toastprompt: similar to the display effect of the Tusi push notification, a message appears on the screen and then disappears.

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

2. aboutprompt: It indicates that the pop-up box is displayed in the middle of the screen, and other pop-up boxes are displayed 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 in the pop-up box.

  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 to enter other information in the T pop-up box.

 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. It is similar to the 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();  }

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.