zoukankan      html  css  js  c++  java
  • Windows phone中如何使用丰富的弹出框提示

    。以下是常用的几种方式:

    首先需要添加引用Coding4Fun.Phone.Controls.dll

    Coding4Fun官网:http://coding4fun.codeplex.com/

    1.ToastPrompt:类似于土司推送通知一样的显示效果,在屏幕上面出现一条消息,然后再消失。

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

    2.AboutPrompt:说明弹出框,特点是弹出框会在屏幕中间,其他的弹出框是在屏幕的上方。

       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:密码输入弹出框,用于输入密码信息。

      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:输入弹出框,用于t弹出输入框输入其他的信息。

     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:消息弹出框,普通的消息弹出框,类似于系统默认的messagebox弹出框。

     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(); 
     }
  • 相关阅读:
    Ubuntu ctrl+alt会导致窗口还原的问题
    Ubuntu设置显示桌面快捷键
    ubuntu鼠标和触摸板的禁用
    Codeforces Round #271 (Div. 2) F题 Ant colony(线段树)
    友盟社会化分享
    ZOJ 3890 Wumpus
    九种迹象表明你该用Linux了
    Java集合源代码剖析(二)【HashMap、Hashtable】
    01_GIT基础、安装
    Launcher知识的demo,手机管家小伙家与悬浮窗
  • 原文地址:https://www.cnblogs.com/zhangfan19900327/p/3105149.html
Copyright © 2011-2022 走看看