예제 #1
0
        private void Border_MouseDown(object sender, MouseButtonEventArgs e)
        {
            var ContentText = ((sender as Border).ToolTip as String);

            if (ContentText == "小萌机器人")
            {
                Robot.Visibility = Visibility.Visible;
                Music.Visibility = Visibility.Collapsed;
                _2048.Visibility = Visibility.Collapsed;
                User.Visibility  = Visibility.Collapsed;
                All.Visibility   = Visibility.Collapsed;
                Robot.BeginAnimation(MarginProperty, new ThicknessAnimation(new Thickness(0, 50, 0, -50), new Thickness(0), TimeSpan.FromSeconds(0.2)));
                //IContentPage.Children.Clear();
                //IContentPage.Children.Add(new IMBOX());
                Mus.Fill            = new SolidColorBrush(Color.FromArgb(0, 255, 255, 255));
                ALL.Fill            = new SolidColorBrush(Color.FromArgb(0, 255, 255, 255));
                Rbt.Fill            = new SolidColorBrush(Color.FromArgb(200, 157, 159, 167));
                Mus.StrokeThickness = 1;
                ALL.StrokeThickness = 1;
                Rbt.StrokeThickness = 0;
            }
            else if (ContentText == "小萌音乐")
            {
                Robot.Visibility = Visibility.Collapsed;
                All.Visibility   = Visibility.Collapsed;
                _2048.Visibility = Visibility.Collapsed;
                User.Visibility  = Visibility.Collapsed;
                Music.Visibility = Visibility.Visible;
                Music.BeginAnimation(MarginProperty, new ThicknessAnimation(new Thickness(0, 50, 0, -50), new Thickness(0), TimeSpan.FromSeconds(0.2)));
                //IContentPage.Children.Clear();
                //   IContentPage.Children.Add(new MusicControl());
                Mus.Fill            = new SolidColorBrush(Color.FromArgb(200, 157, 159, 167));
                ALL.Fill            = new SolidColorBrush(Color.FromArgb(0, 255, 255, 255));
                Rbt.Fill            = new SolidColorBrush(Color.FromArgb(0, 255, 255, 255));
                Mus.StrokeThickness = 0;
                ALL.StrokeThickness = 1;
                Rbt.StrokeThickness = 1;
            }
            else if (ContentText == "其他")
            {
                Robot.Visibility = Visibility.Collapsed;
                Music.Visibility = Visibility.Collapsed;
                User.Visibility  = Visibility.Collapsed;
                _2048.Visibility = Visibility.Collapsed;
                All.Visibility   = Visibility.Visible;
                All.BeginAnimation(MarginProperty, new ThicknessAnimation(new Thickness(0, 50, 0, -50), new Thickness(0), TimeSpan.FromSeconds(0.2)));
                //  IContentPage.Children.Clear();
                //IContentPage.Children.Add(new AllControl());
                Mus.Fill            = new SolidColorBrush(Color.FromArgb(0, 255, 255, 255));
                ALL.Fill            = new SolidColorBrush(Color.FromArgb(200, 157, 159, 167));
                Rbt.Fill            = new SolidColorBrush(Color.FromArgb(0, 255, 255, 255));
                Mus.StrokeThickness = 1;
                ALL.StrokeThickness = 0;
                Rbt.StrokeThickness = 1;
            }
        }