我正在阅读Shawn Wildermuth的文章,该文章介绍了使用MVVM light架构Silverlight应用程序:http://wildermuth.com/2010/01/02/Architecting_SL4_Apps_with_RIA_Services_MEF_and_MVVM_-_Part_4_%28of_3%29。
我想知道以下两者之间有什么区别:
并且
我想知道以下两者之间有什么区别:
<Button
Content="Previous Page" >
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<i:InvokeCommandAction CommandName="PreviousPage"/>
<ei:CallMethodAction TargetObject="{Binding ElementName=grid}"/>
</i:EventTrigger>
</i:Interaction.Triggers>
</Button>
并且
<Button Command="{Binding PreviousPage}"
Grid.Row="0"
Content="Previous Page" />
你什么时候会特别使用触发器?
提前感谢:)