title: Binding output of Custom Activity designer to activity argument
body: <p>I am trying to add a custom activity designer for an activity that I have. The activity looks a little like:</p>
  
  <pre><code>public class WaitForUserInputActvitiy : NativeActivity
  {
      public InArgument&lt;UserInteractionProperty[]&gt; UserInteraction { get; set; }
  }
  </code></pre>
  
  <p>I am trying to put a designer on the activity to make it a bit nicer to set these values (so you don't end up typing VB in directly. My designer is based on mindscape property grid. I have an ObservableDictionary source that I want to get the values from and put them in to the InArgument. Currently I am using </p>
  
  <pre><code> private void TestGrid_LostFocus(object sender, RoutedEventArgs e)
   {
      using (ModelEditingScope editingScope = this.ModelItem.BeginEdit())
      {
          Argument myArg = Argument.Create(typeof(WaitForUserInputActvitiy), ArgumentDirection.In);
          this.ModelItem.Properties["UserInteraction"].SetValue(source.Values.ToArray());
  
          editingScope.Complete();
      }
  }
  </code></pre>
  
  <p>However this results in an ArgumentException "Object of type UserInteractionProperty[] cannot be converted to InArgument`1[UserInteractionProperty[]].</p>
  
  <p>So how do I convert my array of UserInteractionProperties into an InArgument? </p>