ソース掲示板




すべてから検索

キーワード   条件 表示 現行ログ 過去ログ トピックス 名前 本文
Windows Phone の MessageBox
日時: 2013/04/20 19:40
名前: lightbox



Windows Phone の .NET API

URL に v=vs.105 が無いと違うところへ行ってしまいます。

MessageBox.Show メソッド (String, String, MessageBoxButton)

WindowsPhone では、MessageBoxButton 列挙体 は、OK と OKCancel しかありません

拡張子:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using System.Diagnostics;
using Microsoft.Phone.Shell;

namespace BlankApp1
{
    public partial class MainPage : PhoneApplicationPage
    {
        // コンストラクター
        public MainPage()
        {
            InitializeComponent();
        }

        private void ApplicationBarIconButton_Click(object sender, EventArgs e)
        {
            var result = MessageBox.Show(
                (sender as ApplicationBarIconButton).Text,
                "タイトル",
                System.Windows.MessageBoxButton.OKCancel
                );

            if (result == MessageBoxResult.OK)
            {
                Debug.WriteLine("OK");
            }
            if (result == MessageBoxResult.Cancel)
            {
                Debug.WriteLine("Cancel");
            }
        }
    }
}
メンテナンス


日時: 2013/04/20 19:40
名前: lightbox