wpf - How to add EventToCommand in XAML -


i use mvvm light(wpf45).

i want add eventtocommand in xaml, use

xmlns:cmd ="http://www.galasoft.ch/mvvmlight" xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" 

but don't add eventtocommand

<button>   <i:interaction.triggers>     <i:eventtrigger eventname="click">      <cmd:eventtocommand/>     </i:eventtrigger>   </i:interaction.triggers> </button> 

i error in <cmd:eventtocommand/>

use reference,

xmlns:cmd="clr-namespace:galasoft.mvvmlight.command;assembly=galasoft.mvvmlight.extras.wpf4" 

you can able use eventtocommand class.

hope helped :)


Comments