記事上にちょいちょいオレオレライブラリが出てくるので、紹介するまでもない事かもしれないけど一応書いておく。
public static class Tool
{
public static async Task<bool> Msg(string strMsg, string strTitle = "")
{
MessageDialog dlg = new MessageDialog(strMsg, strTitle);
var rtn = await dlg.ShowAsync();
return true;
}
}
確認ダイアログとかになると、もうちょっと実装が必要だけど、とりあえずメッセージを表示するだけのもの。
使うときは、
await Tool.Msg("Message!", "Title");
だけになるので記述が楽チン。
(WindowsPhoneも一緒だっけ??)