public MainPage() { this.InitializeComponent(); toTransitions.ItemsSource = TransitionProvider.TransitionNames; toTransitions.SelectedIndex = TransitionProvider.GetSelectedIndex("to"); fromTransitions.ItemsSource = TransitionProvider.TransitionNames; fromTransitions.SelectedIndex = TransitionProvider.GetSelectedIndex("from"); }
private void fromTransitions_SelectionChanged(object sender, SelectionChangedEventArgs e) { var selectedTypeName = fromTransitions.SelectedItem.ToString(); var selectedIndex = fromTransitions.SelectedIndex; var transition = TransitionProvider.SelectTransition("from", selectedTypeName, selectedIndex); if (transition != null) { dynamic transitionType = Activator.CreateInstance(transition); this.Transitions = new TransitionCollection() { transitionType }; } }