WPF事件转Command
引入名称空间:
.net Framework :
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
.Net Core:
安装Nuget包 Microsoft.Xaml.Behaviors.Wpf
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
使用:
<i:Interaction.Triggers>
<i:EventTrigger EventName="Loaded">
<i:InvokeCommandAction Command="{Binding LoadingCommand}"/>
</i:EventTrigger>
</i:Interaction.Triggers>

浙公网安备 33010602011771号