title: Ninject: Implement WithConstructorArgument(string name, Func<IContext,object> callback)
body: <p>I have a MVVM WP7 app in which I'm trying to send a value from one Page/ViewModel to the contructor of a second ViewModel. I already have Ninject set up and got this to work with a static test value using a line such as:</p>
  
  <pre><code>this.Bind&lt;TaskViewModel&gt;().ToSelf().WithConstructorArgument("TaskID", 2690)
  </code></pre>
  
  <p>Again, that works with a static value but I need it to be a variable selected by the user. I've been told to use the overload </p>
  
  <pre><code>WithConstructorArgument(string name, Func&lt;IContext,object&gt; callback). 
  </code></pre>
  
  <p>I would think that this callback would call a function on the first ViewModel and get the value.</p>
  
  <p>But I have not been successful, readily admitting I am not very experienced in either Ninject or using a Func callback argument. I've tried setting up a delegate and function to get the value from the first ViewModel but that gives an error saying I'm trying to pass in a type. How exactly do I specify that argument to use a callback and am I correct to use a delegate in the first ViewModel or something else?</p>