title: How to set the default ComboBox selection inside my XAML code?
body: <p>How can I set the default selection of my ComboBox right inside my XAML code? This is what the code of my ComboBox looks like:</p>
  
  <pre><code>&lt;ComboBox Name="ComboBox1" Width="200" Height="30" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="10,10,0,0"&gt;           
    &lt;ComboBoxItem&gt;My first item&lt;/ComboBoxItem&gt;
  &lt;/ComboBox&gt;
  </code></pre>
  
  <p>In my C# code, I always used to set the default value of the ComboBox like this:</p>
  
  <pre><code>ComboBox1.SelectedIndex = 0;
  </code></pre>
  
  <p>Is it possible to do the same thing in my XAML code?</p>