Search code examples
c#wpfvisual-studiowindows-phonemobile-application

Take an input from a combo box in Windows Mobile Applications


I have the following combo box in the Mobile App

<ComboBox name="cmb_tax" Grid.Row="2" Grid.Column="1">
      <ComboBoxItem content="10%" />
      <ComboBoxItem content="20%" />
      <ComboBoxItem content="30%" />
</ComboBox>

and want to take the value passed from this to a string variable. Thank you in advance.


Solution

  • ((ComboBoxItem)cmb_tax.SelectedItem).Content.ToString();