title: Dynamic generation of ViewModel from Model
body: <p>I have a model class that contains an array of command operations that can be performed on it. The idea is that the UI for editing that model instance can be dynamically generated at runtime; this I intend to do using dynamic XAML creation. So far, so good.</p>
  
  <p>However the ViewModel is quite another thing. The question is what my dynamic UI elements bind to - they need a property in the ViewModel to bind to, so it would appear that I need to dynamically add properties to the VM instance and suddenly that is looking awfully messy.</p>
  
  <p>Alternatively, if the binding could send an additional parameter that allowed me to bind to a single property that then used that parameter to decide what to do with the value, then that would be a cleaner and simpler solution.</p>
  
  <p>Or: something I don't know or haven't considered.</p>