Suppose you use .NetFramework4
:
First add namespace
:
xmlns:cmd="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Platform"
Syntax for the Loaded event.
<i:Interaction.Triggers>
<i:EventTrigger EventName="Loaded">
<cmd:EventToCommand Command="{Binding Mode=OneWay, Path=LoadedCommand}"
PassEventArgsToCommand="True" />
</i:EventTrigger>
</i:Interaction.Triggers>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…