locked
How Can I detect that FlowChart is being dragged RRS feed

  • Question

  • Hi,

     

    I'm trying to implement a system using WF4.

     

    I opened a new Activity (Add new item --> (Workflow sub category)Activity),

    After that I dragged a flowchart into the created activity,

     

    Thing is that I need some code executed when the flowchart is being dragged (when drag start) but I can't for the life of me detect any event indicating it (I only capture drag events for items sitting inside the flowchart, not the flowchart itself).

     

    Help would be much appreciated :)

     

    Thanks in advance

    Eyal.

     

    • Edited by Quesso Levy Wednesday, March 2, 2011 8:18 AM more information
    Wednesday, March 2, 2011 8:16 AM

Answers

  • Hi, Quesso

    If you use your own workflow designer, you can detect workflow changing by the following code:

           ModelService modelService = wd.Context.Services.GetService<ModelService>();
                modelService.ModelChanged += (obj, arg) => {
                    Console.WriteLine("workflow changed");
                };

    wd is a instance of WorkflowDesigner class.

    Hope this helps
    Regards


    MSDN Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    This posting is provided "AS IS" with no warranties, and confers no rights. My Blog: http://xhinker.com
    Microsoft Windows Workflow Foundation 4.0 Cookbook
    • Marked as answer by Quesso Levy Tuesday, March 8, 2011 12:48 PM
    Monday, March 7, 2011 2:34 AM

All replies

  • Hi, Quesso

    If you use your own workflow designer, you can detect workflow changing by the following code:

           ModelService modelService = wd.Context.Services.GetService<ModelService>();
                modelService.ModelChanged += (obj, arg) => {
                    Console.WriteLine("workflow changed");
                };

    wd is a instance of WorkflowDesigner class.

    Hope this helps
    Regards


    MSDN Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    This posting is provided "AS IS" with no warranties, and confers no rights. My Blog: http://xhinker.com
    Microsoft Windows Workflow Foundation 4.0 Cookbook
    • Marked as answer by Quesso Levy Tuesday, March 8, 2011 12:48 PM
    Monday, March 7, 2011 2:34 AM
  • Are you building a rehosted designer application, or doing something for inside Visual Studio?
    Tim

    Monday, March 7, 2011 2:55 AM
  • Thanks alot Andrew,

    I come from flex 3.5 background and the transition to WF4 and WPF is not going as smoothly as I hoped :), guess it gonna take a while for me to get the hang of it.

     

    Tuesday, March 8, 2011 12:48 PM
  • Are you building a rehosted designer application, or doing something for inside Visual Studio?
    Tim


    Actually I'm writing a custom activities package that suppose serve as building blocks for our cellular applications writers,

     

    Eyal.

    Tuesday, March 8, 2011 1:11 PM