title: WPF user control without codebehind
body: <p>I've got a simple GUI:</p>
  
  <p><img src="https://i.imgur.com/3Y8WGMd.png" alt="current gui"></p>
  
  <p>Which combines the command from the dropdown with an optional parameter, and formats them as shown with &lt;&lt;%Connect%Parameter>></p>
  
  <p>I'd like to basically add 5-6 more of these things, so that I can have a bunch of different command/parameter combos set up by default, and be able to just press the respective Send button, rather than changing one each time (there are a few combos which are used very often):</p>
  
  <p><img src="https://i.imgur.com/RI2OYUS.png" alt="desired gui">
  (obviously the single "String Being Sent:" isn't really relevant anymore, as it depends on which Send you click)</p>
  
  <p>This was done just by copy/pasting the code for each one.  I know UserControls exist (that's what I should be doing, right?) but I'm using MVVM/relay commands and am unsure if they'll work without codebehind.</p>
  
  <p>My naive approach is to make a struct of command enums and parameter strings:</p>
  
  <pre><code>struct CommandString
  {
      public CommandEnum Command;
      public string Parameter;
  }
  </code></pre>
  
  <p>Store them in a list, and hard code each row on the UI to a different index in the list, then hard code the Send button to pass in that same index to the relay command so it knows which one to use.</p>
  
  <p>Can I make use of a UserControl to cut down on the copy/pasting?  Will it work with MVVM and relay commands?</p>