在我的XAML中,我有这个命令(这是我从http://marlongrech.wordpress.com获得的 AttachedCommand ):
<TextBlock Text="Edit Test Customer">
<Commands:CommandBehaviorCollection.Behaviors>
<Commands:BehaviorBinding Event="MouseLeftButtonDown"
Command="{Binding ClickEditTestCustomer}"/>
</Commands:CommandBehaviorCollection.Behaviors>
</TextBlock>
然后在命令中,如果我在ExecuteDelegate代码中设置断点,例如在“layoutManger ...”行上,即使执行了该代码,它也不会在断点处停止(我看到了我的观点):
ClickEditTestCustomer = new SimpleCommand
{
ExecuteDelegate = parameterValue =>
{
LayoutManager layoutManager = container.Resolve<LayoutManager>();
layoutManager.DisplayViewAsPane("EditCustomer", "Edit Customer", new EditCustomerView());
}
};
如何设置断点并使代码停止在 AttachedCommand 内的一行上?