locked
Are there Adorners/Features WF 4 designer? RRS feed

  • Question

  • Hi there.
    I'm investigating if there is a possibility to add some custom adorner to a WF4 activity designer.
    There is such possibility in WPF designer, but in WF4 designer i don't see one.

    All I need to do is to add some kind of pins which appear for each InArgument/OutArgument of an activity.

    Any ideas?
    Best regards, Alexander Efimov
    Thursday, December 17, 2009 12:34 PM

Answers

  • Here is the Kushal's post:

    http://blogs.msdn.com/kushals/archive/2010/01/04/base-designer-with-additional-adornments.aspx
    Best regards, Alexander Efimov
    Sunday, January 10, 2010 8:30 PM

All replies

  • Alexander,

    Ahh, the Feature feature :-)

    in vs2010, we do not have public support for injecting Feature and FeatureProvider like functionality.  If you happen to look inside our assemblies, we do have an internal implementation of a type called Feature that is used to hang functionality across designers (much like Cider's ability to hang adorners on other designers).  We did not make it public because we're not sure if that's the approach we want to have long term (vs using something like MEF to handle "feature" injection).  We use it to provide capabilities for some of the generic activities to provide type switching.

    A more robust extensiblity model around that is something that we are thinking about for post vs2010.

    What do you want to do with the pins that are added (I think you might want to do some visualization of the databinding, which is something that we're also thinking about after vs2010)?  Feel free to drop me mail (mwinkle at you can guess it .com) with more details of what you're trying to do.

    matt


    **usual caveats apply for forward looking statements, right now these are just things we're thinking about.  When, if and how they actually materialize in the product is something we'll talk about when we've got something to talk about  **
    Program Manager -- wf designer -- http://blogs.msdn.com/mwinkle
    Thursday, December 17, 2009 7:30 PM
  • First of all,
      Thank you Matt, Ramraj and Kushal.

     Here is the summary of conversation which I had with them by e-mail. May be it helps someone:
          
    Me:

    Now, I’m going to write you about what I want to get from WF4 designer. We have a project, where we re-host WF 4 designer and where users can build workflows from custom activities.

    All of these custom activities have InArguments and OutArguments of course. And the idea was to add pins to each activity(not only custom activity, but also ones from System.Activities.Statements).

    One pin for each InArgument and OutArgument. So the user can just start dragging from one pin (for OutArgument for example) and dropping on the other one(InArgument). So the idea was that our designer application will automatically create variables needed to connect these activities.

     

    And now I don’t know if I have any out-of-box possibilities to implement desired functionality in WF 4 designer.

     

    Matt:
    ..
        One way that I could think of doing this is to provide a new custom designer for the base type of your custom activities.   This would not add Pins to all activities, only the ones you wanted.
    ..

    Ramraj:

        Hi Alexander, Wrapping every workflowelement might not be the best option . Internally we still have a lot of code that relies on the exact workflowviewelement tree ( e.g cutcopypaste helper traverses the workflowviewelement tree upwards sometimes to figure out whom to route the cut/paste handling to etc. The best option that we have identified so far in 4.0 WFDesigner is to get the ControlTemplate for ActivityDesigner ( through blend/.net reflector etc), and customize it and apply it to all designer types in your rehosted app, at the application level. That way you can customize any element of the activity designer’s UI. ( not as restrictive as adorners).

    Me:
    Hello, Ramraj. I’m very sorry for the inconvenience, but is there an example of overriding the ActivityDesigner’s ControlTemplate?

    Ramraj:

    Alexander, Kushal will be publishing a sample for this one soon.


     So, I'm waiting for this example. Thank you again, guys.
    Thursday, December 24, 2009 2:34 PM
  • Here is the Kushal's post:

    http://blogs.msdn.com/kushals/archive/2010/01/04/base-designer-with-additional-adornments.aspx
    Best regards, Alexander Efimov
    Sunday, January 10, 2010 8:30 PM