. 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(); }