Created
June 10, 2013 03:08
-
-
Save rtanote/5746286 to your computer and use it in GitHub Desktop.
Livetを使ったエラーメッセージ等の実装例
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
<!-- xmlns:l="http://schemas.livet-mvvm.net/2011/wpf" --> | |
<i:Interaction.Triggers> | |
<l:InteractionMessageTrigger MessageKey="Error" Messenger="{Binding Messenger}"> | |
<l:InformationDialogInteractionMessageAction/> | |
</l:InteractionMessageTrigger> | |
</i:Interaction.Triggers> | |
*/ | |
// ViewModel | |
try { | |
// do something. | |
} catch (Exception e) { | |
Messenger.Raise(new InformationMessage("例外が発生しました","エラー","Error")); | |
//MessageBox.Show("例外が発生しました"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment