Пример #1
0
        public void changesubframe(int subframekey)
        {
            Debug.Print("changesubframe in Navigation called with subframekey: " + navsubframekey);
            switch (subframekey)
            {
            case 1:

                NaviSubFrame.Navigate(nav1);
                break;

            case 2:
                NaviSubFrame.Navigate(nav2);
                break;

            case 3:
                NaviSubFrame.Navigate(nav3);
                break;

            case 4:
                NaviSubFrame.Navigate(nav4);
                break;

            default:
                Debug.Print("no case called in NaviSubFrame");    // ruf den falschen key auf beim welchsel von links auf rechts oder anderhern wegen der reihenfolge! nachshcaun wie bei main gemacht und übernehmen!
                break;
            }
        }
Пример #2
0
        public void changesubframe(int subframekey, int direction) // direction 1 is to the right 2 is to the left
        {
            DoubleAnimation blendout = new DoubleAnimation()
            {
                From     = 1,
                To       = 0,
                Duration = TimeSpan.FromMilliseconds(200)
            };
            DoubleAnimation blendin = new DoubleAnimation()
            {
                From     = 0,
                To       = 1,
                Duration = TimeSpan.FromMilliseconds(200)
            };

            switch (subframekey)
            {
            case 1:     //nav1

                if (direction == 1)
                {
                    NaviSubFrame.Navigate(nav4);

                    nav4.BeginAnimation(Frame.OpacityProperty, blendin);
                }
                else if (direction == 2)
                {
                    NaviSubFrame.Navigate(nav2);

                    nav2.BeginAnimation(Frame.OpacityProperty, blendin);
                }
                nav1.BeginAnimation(Frame.OpacityProperty, blendout);
                break;


            case 2:     //nav2

                if (direction == 1)
                {
                    NaviSubFrame.Navigate(nav1);

                    nav1.BeginAnimation(Frame.OpacityProperty, blendin);
                }
                else if (direction == 2)
                {
                    NaviSubFrame.Navigate(nav3);

                    nav3.BeginAnimation(Frame.OpacityProperty, blendin);
                }
                nav2.BeginAnimation(Frame.OpacityProperty, blendout);
                break;

            case 3:     //nav3

                if (direction == 1)
                {
                    NaviSubFrame.Navigate(nav2);

                    nav2.BeginAnimation(Frame.OpacityProperty, blendin);
                }
                else if (direction == 2)
                {
                    NaviSubFrame.Navigate(nav4);

                    nav4.BeginAnimation(Frame.OpacityProperty, blendin);
                }
                nav3.BeginAnimation(Frame.OpacityProperty, blendout);
                break;

            case 4:     //nav4

                if (direction == 1)
                {
                    NaviSubFrame.Navigate(nav3);

                    nav3.BeginAnimation(Frame.OpacityProperty, blendin);
                }
                else if (direction == 2)
                {
                    NaviSubFrame.Navigate(nav1);

                    nav1.BeginAnimation(Frame.OpacityProperty, blendin);
                }
                nav4.BeginAnimation(Frame.OpacityProperty, blendout);
                break;

            default:
                Debug.Print("no case called");
                break;
            }
        }
Пример #3
0
 public NavigationScreen()
 {
     InitializeComponent();
     NaviSubFrame.Navigate(nav1);
 }