var item = (ListBoxItem)listbox1.SelectedItem;
var content = (string)item.Content;