title: How to get value of SelectedValue in ComboBox filled with Dictionary
body: <p>We have dictionary like this:</p>
  
  <pre><code>var dictionary = new Dictionary&lt;int, int&gt; { { 0, 100 }, { 1, 202 }, { 2, 309 }, };
  </code></pre>
  
  <p>and so on a lot of values. dictionary binded to comboBox like this:</p>
  
  <pre><code>comboBox1.ItemsSource = dictionary;
  comboBox1.DisplayMemberPath = "Value";
  </code></pre>
  
  <p>I'm wonder how can I get selectedvalue of this comboBox, if comboBox.Text works only for manually inputted values and this code:</p>
  
  <pre><code>string value = comboBox1.SelectedValue.ToString();
  </code></pre>
  
  <p>return value like [1, 202], while I need clear int TValue "202". I'm unable to find similar question so I ask it there and hope that the answer may be useful for someone else.</p>