locked
Delete command and rehosting WF4 designer? RRS feed

  • General discussion

  • Hi, All

    I have an application which rehosts the WF4 designer and I'd like to override the default "Delete" command's behaviour. I added the following code to xaml file:

    <

     

     

    UserControl.CommandBindings>

    <CommandBinding Command="Delete"

     

     

    CanExecute="Delete_CanExecute"

     

     

    PreviewCanExecute="PreviewDelete_CanExecute"

     

     

    PreviewExecuted="PreviewDelete_Executed"

     

     

    Executed="Delete_Executed"

     

     

    />

     

     

     

    </UserControl.CommandBindings>

    Bides, I have a button binding to Delete command:

    <

     

     

    Button Command="Delete"

     

     

    ToolTip="Delete"

     

     

     

    <Image Source="delete.png" />

     

     

     

    </Button>

    When I select an activity, I can use the button to delete it, but Delete_Executed & PreviewDelete_Executed are never called. Do you know how should I do?

    Thanks

    • Changed type Andrew_Zhu Friday, July 23, 2010 7:56 AM no response
    Monday, July 19, 2010 7:32 AM

All replies

  • Hi Akira,
    In terms of the UI, where is the Delete button? Is it inside or outside the workflow designer? And where is the workflow designer relative to your UserControl - inside (child/descendant) or outside (sibling/cousin)?
    Tim

    Wednesday, July 21, 2010 6:50 PM