locked
Writing a custom activity in code RRS feed

  • Question

  • Hi,

    I had success in writing XAML-based activity and reuse that activities in different activity.

    I am very curious to know how to do this, I would like rewrite my XAML based activity entirely using C# and be able to reuse it.

    I want to create an activity, derived from System.Activities.Activity (or appropriate class), and this activity may have one or more activities inside it.

    Let say that I have a XAML-based activity that contains a Sequence activity with three WriteLine activities inside that Sequence. How can I replicate that XAML-based activity entirely using code? This activity should be reusable (I can drop it onto designer).

    Two reasons why I want to do this. code is much easier to diff, and I am just curious. :)

    Saturday, June 21, 2014 2:12 AM

All replies

  • Hi,

    According to your description above, you want to rewrite XAML based workflow activity.

    For this issue, I'd like to suggest you to learn relevant topic about reusing workflow activity in bing, some examples are good reference for you.

    Reference:

    Referencing Dynamic Activities: Reusing Workflow Activities

    hope it helps.

    Regards


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, June 23, 2014 3:21 AM
  • Hi thank you.

    That link shows how I can reference a Xaml activity and use it. That is not really what I want.

    I would like to be able to rewrite the Xaml activity to C# code, and then use that activity instead.

    Thursday, June 26, 2014 10:48 PM