Skip to content

Instantly share code, notes, and snippets.

@rtanote
Last active December 17, 2015 14:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rtanote/5624231 to your computer and use it in GitHub Desktop.
Save rtanote/5624231 to your computer and use it in GitHub Desktop.
Livetを使ったダイアログ表示とVM連携
<!--
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"
xmlns:l="http://schemas.livet-mvvm.net/2011/wpf"
-->
<Button Content="開く" IsEnabled="{Binding OpenCommand.CanExecute}>
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<l:OpenFileDialogInteractionMessageAction>
<l:DirectInteractionMessage CallbackCommand="{Binding OpenCommand, Mode=OneWay}">
<l:OpeningFileSelectionMessage Filter="すべてのファイル(*.*)|*.*" Title="ファイルを開く" MultiSelect="True"/>
</l:DirectInteractionMessage>
</l:OpenFileDialogInteractionMessageAction>
</i:EventTrigger>
</i:Interaction.Triggers>
</Button>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment