コード例 #1
0
        private void NavBar1_MouseLeave(object sender, MouseEventArgs e)
        {
            if (NavBar1.Width > 60)
            {
                DoubleAnimation animation = new DoubleAnimation();
                animation.From     = NavBar1.ActualWidth;
                animation.To       = 60;
                animation.Duration = TimeSpan.FromSeconds(0.3);
                NavBar1.BeginAnimation(WidthProperty, animation);

                DoubleAnimation anim = new DoubleAnimation();
                anim.From     = btn1.ActualWidth;
                anim.To       = 32;
                anim.Duration = TimeSpan.FromSeconds(0.3);
                btn1.BeginAnimation(WidthProperty, anim);
                btn2.BeginAnimation(WidthProperty, anim);
                btn3.BeginAnimation(WidthProperty, anim);
                btn4.BeginAnimation(WidthProperty, anim);
                btn5.BeginAnimation(WidthProperty, anim);
                btn6.BeginAnimation(WidthProperty, anim);

                btn1.Content = "";
                btn2.Content = "";
                btn3.Content = "";
                btn4.Content = "";
                btn5.Content = "";
                btn6.Content = "";
            }
        }
コード例 #2
0
        void ReleaseDesignerOutlets()
        {
            if (FlightTableView != null)
            {
                FlightTableView.Dispose();
                FlightTableView = null;
            }

            if (NavBar1 != null)
            {
                NavBar1.Dispose();
                NavBar1 = null;
            }

            if (SettingsButton != null)
            {
                SettingsButton.Dispose();
                SettingsButton = null;
            }

            if (StartRangeTextField != null)
            {
                StartRangeTextField.Dispose();
                StartRangeTextField = null;
            }
        }
コード例 #3
0
        private void NavBar1_MouseEnter(object sender, MouseEventArgs e)
        {
            if (NavBar1.Width < 190)
            {
                DoubleAnimation animation = new DoubleAnimation();
                animation.From     = NavBar1.ActualWidth;
                animation.To       = 190;
                animation.Duration = TimeSpan.FromSeconds(0.3);
                NavBar1.BeginAnimation(WidthProperty, animation);

                DoubleAnimation anim = new DoubleAnimation();
                anim.From     = btn1.ActualWidth;
                anim.To       = 145;
                anim.Duration = TimeSpan.FromSeconds(0.3);
                btn1.BeginAnimation(WidthProperty, anim);
                btn2.BeginAnimation(WidthProperty, anim);
                btn3.BeginAnimation(WidthProperty, anim);
                btn4.BeginAnimation(WidthProperty, anim);
                btn5.BeginAnimation(WidthProperty, anim);
                btn6.BeginAnimation(WidthProperty, anim);

                btn1.Content = "Факториал";
                btn2.Content = "Комбинаторика";
                btn3.Content = "Виды СВ";
                btn5.Content = "КОП";
                btn6.Content = "ТСиУВ";
                btn4.Content = "Выход";
            }
        }