예제 #1
0
        public MainPage()
        {
            this.InitializeComponent();

            toTransitions.ItemsSource     = TransitionProvider.TransitionNames;
            toTransitions.SelectedIndex   = TransitionProvider.GetSelectedIndex("to");
            fromTransitions.ItemsSource   = TransitionProvider.TransitionNames;
            fromTransitions.SelectedIndex = TransitionProvider.GetSelectedIndex("from");
        }
예제 #2
0
        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
                };
            }
        }