I want get the data from combobox in WPF.

below is mu sample code.

```
<ComboBox Name="cmbCompanies" Height="110" Width="560" HorizontalAlignment="Right"  SelectionChanged="cmbCompanies_SelectionChanged">
                    <ComboBox.ItemTemplate>
                        <DataTemplate>
                            <StackPanel Orientation="Horizontal">
                                <TextBlock Text="{Binding Name}"/>
                            </StackPanel>
                        </DataTemplate>
                    </ComboBox.ItemTemplate>
            </ComboBox>

```

my code-behind is:

to bind the data to combobox:

```
 JArray companies = (JArray)response["data"];
            System.Diagnostics.Debug.WriteLine(companies.Count);
            if (companies.Count == 0)
            {
                // alert no compaies associated with this account.
            }
            else
            {
                System.Diagnostics.Debug.WriteLine(companies);

                for (int i = 0; i < companies.Count; i++)
                {

                    Companies com = new Companies();
                    com.Id = (string)companies[i]["id"];
                    com.Name = (string)companies[i]["name"];

                    cmbCompanies.Items.Add(com);

                }

```

to get the data:

```
private void cmbCompanies_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            //     string text = (e.AddedItems[0] as ComboBoxItem).Content as string;
            string item = (sender as ComboBox).SelectedItem.ToString();

            string tmp = (cmbCompanies.SelectedValue as ComboBoxItem).Content.ToString();

        }

```

I am trying the above code but i am getting the any values, please help on this.