private void ScenarioControl_SelectionChanged(object sender, SelectionChangedEventArgs e) { ListBox scenarioListBox = sender as ListBox; ScenarioModel s = scenarioListBox.SelectedItem as ScenarioModel; if (s != null) { ScenarioFrame.Navigate(s.ClassType); if (Window.Current.Bounds.Width < 640) { Spiltter.IsPaneOpen = false; } } }
public object Convert(object value, Type targetType, object parameter, string language) { ScenarioModel s = value as ScenarioModel; return((Main.Current.Scenarios.IndexOf(s) + 1) + ")" + s.Title); }
public Main() { this.InitializeComponent(); Current = this; Scenarios = ScenarioModel.scenariosShow(); }