how do you bind parameters in a XAML activity with a custom activity designer?


  • I know it is possible to associate a XAML activity to a custom activity designer.

    In my case the xaml activity contains just an InvokeMethod activity. This activity takes a TargetObject and a Method Name. The method has two parameters.

    My custom designer would have two ExrepssionTextBoxes to assign the two parameters the method needs (this gives the developer an easier experience than using the regular Parameter colletion in the properties box).

    The question is, how can I bind the expression text boxes to the parameters? you would think by using ModelItem but using it how?








    Friday, October 21, 2011 11:50 PM


  • Hi Ale,

    You did define some arguments on your XAML custom activity right? e.g. 'Parameter1' and 'Parameter2'

    When your XAML is compiled this results in a CLR class definition like

    public class MyActivity {
        public string Parameter1 { get; set; }
        public int Parameter 2 {get; set; }

    And you can bind them to an expression text box using the Path ModelItem.Parameter1, ModelItem.Parameter2 (and ArgumentToExpressionConverter).

    Thursday, October 27, 2011 10:46 PM