Example #1
0
 private void expandplayarea()
 {
     ExpandBackAnimation.Begin();
     Shrink.Glyph = "\uE70D";
     ToolTipService.SetToolTip(Shrink, "缩小");
     AlbumCover.Visibility            = Visibility.Visible;
     SongPLayingName.Visibility       = Visibility.Visible;
     SongPLayingSingerName.Visibility = Visibility.Visible;
     RelativePanel.SetAlignHorizontalCenterWithPanel(CommandButtons, true);
     RelativePanel.SetAlignRightWithPanel(PlayProcess, true);
     RelativePanel.SetAbove(CommandButtons, PlayProcess);
     RelativePanel.SetAlignLeftWith(PlayProcess, SongPLayingSingerName);
     RelativePanel.SetAlignLeftWithPanel(CommandButtons, false);
     RelativePanel.SetAlignBottomWithPanel(CommandButtons, false);
     RelativePanel.SetRightOf(PlayProcess, null);
     RelativePanel.SetLeftOf(PlayProcess, null);
 }
Example #2
0
        private void Expand_PointerPressed(object sender, PointerRoutedEventArgs e)
        {
            if (PlayArea.Height == DefaultHeight)
            {
                ExpandAnimation.Begin();
                BorderExpandAnimation.Begin();
                Expand.Glyph = "\uE70D";
                ToolTipService.SetToolTip(Expand, "缩小");
                Shrink.Visibility    = Visibility.Collapsed;
                LyricArea.Visibility = Visibility.Visible;
                BackImage.Visibility = Visibility.Visible;
                Acrylic.Visibility   = Visibility.Visible;

                RelativePanel.SetRightOf(SongPLayingName, null);
                RelativePanel.SetAlignLeftWith(SongPLayingSingerName, null);
                RelativePanel.SetBelow(SongPLayingName, AlbumCover);
                RelativePanel.SetAlignHorizontalCenterWith(SongPLayingName, AlbumCover);
                RelativePanel.SetAlignHorizontalCenterWith(SongPLayingSingerName, AlbumCover);
                RelativePanel.SetAlignLeftWith(PlayProcess, AlbumCover);
            }
            else if (PlayArea.Height > DefaultHeight)
            {
                ShrinkBackAnimation.Begin();
                BorderShrinkAnimation.Begin();
                Expand.Glyph = "\uE70E";
                ToolTipService.SetToolTip(Expand, "伸展");
                Shrink.Visibility    = Visibility.Visible;
                LyricArea.Visibility = Visibility.Collapsed;
                BackImage.Visibility = Visibility.Collapsed;
                Acrylic.Visibility   = Visibility.Collapsed;

                RelativePanel.SetBelow(SongPLayingName, null);
                RelativePanel.SetAlignHorizontalCenterWith(SongPLayingName, null);
                RelativePanel.SetAlignHorizontalCenterWith(SongPLayingSingerName, null);
                RelativePanel.SetBelow(SongPLayingName, null);

                RelativePanel.SetAlignLeftWith(SongPLayingSingerName, SongPLayingName);
                RelativePanel.SetAlignLeftWith(PlayProcess, SongPLayingName);
                RelativePanel.SetRightOf(SongPLayingName, AlbumCover);
            }
            else if (PlayArea.Height < DefaultHeight)
            {
                expandplayarea();
            }
        }
Example #3
0
        private void shrinkplayarea()
        {
            ShrinkAnimation.Begin();
            Shrink.Glyph = "\uE738";
            ToolTipService.SetToolTip(Shrink, "陛下,真不能再小了");
            AlbumCover.Visibility            = Visibility.Collapsed;
            SongPLayingName.Visibility       = Visibility.Collapsed;
            SongPLayingSingerName.Visibility = Visibility.Collapsed;
            RelativePanel.SetAlignHorizontalCenterWithPanel(CommandButtons, false);

            RelativePanel.SetAlignRightWithPanel(PlayProcess, false);
            RelativePanel.SetAbove(CommandButtons, null);
            RelativePanel.SetAlignLeftWith(PlayProcess, null);
            RelativePanel.SetAlignLeftWithPanel(CommandButtons, true);
            RelativePanel.SetAlignBottomWithPanel(CommandButtons, true);
            RelativePanel.SetRightOf(PlayProcess, CommandButtons);
            RelativePanel.SetLeftOf(PlayProcess, Expand);
        }