I have a custom activity, with a single in argument which is a string. However, rather than allow the designer to enter an arbitrary string, I want the designer to be presented with a Combobox with the list of options, the options are dynamic and are loaded from a database into a List<> collection.
My problem is I have no clue how to bind the Combobox in the designer to this list and have the selection set to the in argument of the activity. Visually I have the activity designer working, it is just this one step.
Normally, I would write the activity with a
propertyrather than anInArgument. This simplifies the scenario:(here ValidOptions is some Collection property on your ActivityDesigner class. MyStringProperty is some public get/set/ property on the underlying activity such as:
)
The problem you will have if you add
InArgumentto the mix is that the string values from the combo box cannot be directly assigned to aModelItemexpectingInArgument<string>. This is fixable using a customIValueConverterin your binding.