wp 常用messagebox

// Show a warning
    MessageBoxResult result = MessageBox.Show("Strobe lights can trigger " +
      "seizures for people with photosensitive epilepsy. " +
      "Are you sure you want to start the strobe light?",
        "Warning!", MessageBoxButton.OKCancel);

    // If the user agreed, change to strobe mode
    if (result == MessageBoxResult.OK)
    {
      // Change the button icon, the mode, and start the timer
      (sender as IApplicationBarIconButton).IconUri =
        new Uri("Images/cancel.png", UriKind.Relative);
      this.mode = FlashlightMode.Strobe;
      this.strobeTimer.Start();
    }

posted on 2012-06-05 11:07  GIS-MAN  阅读(406)  评论(0编辑  收藏  举报

导航