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(); } }
private void StackPanel_Tapped(object sender, TappedRoutedEventArgs e) { if (ViewModel.DetailsVisible == Visibility.Collapsed) { ExpandAnimation.Begin(); ViewModel.DetailsVisible = Visibility.Visible; DetailsIcon.Translation = new Vector3(0f, 12f, 0f); DetailsIcon.Rotation = 180; DetailsIcon.RotationAxis = new Vector3(1f, 0f, 0f); } else { ViewModel.DetailsVisible = Visibility.Collapsed; CompressAnimation.Begin(); DetailsIcon.Translation = new Vector3(0f, 0f, 0f); DetailsIcon.Rotation = 0; } }
private void SearchBox_OnPointerEntered(object sender, PointerRoutedEventArgs e) { ExpandAnimation.Begin(); }