private void Formats_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e) { int index = Formats.SelectedIndex; if (index > -1) { FormatsPage.IsOpen = false; FormatsButton.Content = (string)Formats.SelectedItem; } }