<ViewCell.ContextActions>
<MenuItem Text="删除"
Command="{Binding Path=HomeVM.DeleteNoteCommand,Source={x:Reference Name=Home}}"
CommandParameter="{Binding .}"
IsDestructive="True"/>
</ViewCell.ContextActions>
ControlTemplate中列表项命令绑定:
<Button Text="删除"
Command="{Binding Source={RelativeSource AncestorType={x:Type local:HomeVM}},Path=ClearNoteCommand}"
CommandParameter="{Binding .}"
IsVisible="{Binding Source={RelativeSource AncestorType={x:Type local:HomeVM}},Path=IsDelete}"
TextColor="SteelBlue"/>