title: MVVM and dynamic generation of controls
body: <p>i've written a tool that generates sql queries using GUI, i want to rewrite the tool using MVVM and WPF, every sql column type has a different control as you can see in the following image</p>
  
  <p><img src="https://i.stack.imgur.com/k5jCM.png" alt="enter image description here"></p>
  
  <p>i add a column filter control based on the sql column type, and i generate the controls using code, just like i used to do in windows forms.</p>
  
  <ol>
  <li>in MVVM i've read that the view is writtien enteirly using XAML,
  does MVVM suite such application where i have to add different user
  controls dynamically to a stack panel?</li>
  <li>The controls won't exist in the view unless some column is double clicked, that means the control won't be available in the xaml and won't be hidden or collapsed.</li>
  <li>is there any way that i can avoid the bindings in the code behind?</li>
  <li>should i create a user control for each column type?</li>
  <li>in general what is the best approach to devlop such application with complex and dynamic ui using mvvm?</li>
  </ol>