title: Add items to WPF combobox dynamically and later reset the value on some event
body: <p>I am new to WPF but I searched a lot and in the end decided to seek help from you guys...</p>
  
  <p>I have a class -  <strong>Location</strong>
  With primary properties as  - </p>
  
  <p>LocationName</p>
  
  <p>LocationID</p>
  
  <p>I wish to bind this class to a combo box in WPF. I fetch the location list from database.
  I need to display the list in the combobox with the first text / value pair as 
  <strong>---Select One---</strong>  / <strong>-1</strong>. Now, so far I have done this - </p>
  
  <p>create  -   </p>
  
  <pre><code>public ObservableCollection&lt;ComboBoxItem&gt; cbLocationList { get; set; }
  
  cbLocationList = new ObservableCollection&lt;ComboBoxItem&gt;();
  
  SelectedcbDefaultLocationListItem = new ComboBoxItem { Content = "---Select One---" , Tag="-1"};
  
  cbLocationList.Add(SelectedcbDefaultLocationListItem);
  </code></pre>
  
  <p>Fill the items in a loop as -</p>
  
  <pre><code>foreach (Location loc in LocationtList)
  {
  
   cbLocationList.Add(new ComboBoxItem  { Content = loc.LocationName, Tag=loc.LocationID.ToString() });
  
  }
  </code></pre>
  
  <p>where I set the <strong>cbLocationList</strong> in XAML as - </p>
  
  <pre><code>ItemsSource="{Binding cbLocationList}" 
  </code></pre>
  
  <p>of the combobox. This works well, but on resetting the form I need to reset the value of the combo box to "-1". I am unable to do so with the tag property. (I searched, and it seems we dont have a <strong>value</strong> property like in the <strong>ListItem</strong>) Every body seems to suggest I bind it with a class and set the DisplayMemberPath and SelectedValuePath.
  Now if I directly bind with my <strong>Location</strong> class, How do I insert the --Select One-- item.
  I could do that by creating a dummy object and insert it into my list before binding. But is this the best way to work in WPF. Maybe there is an altogether different approach which I am missing. Please advise.</p>
  
  <p>Thanks in advance. !</p>