public void ShowAuxilliaryPane(AuxiliaryPane pane, int width = 235, bool openleft = false) { LoggingHandler.Log($"Showing pane --> {pane}"); if (SelectedAuxiliaryPane == pane) { HideAuxilliaryPane(); return; } if (SelectedAuxiliaryPane != AuxiliaryPane.None) { HideAuxilliaryPane(false); } switch (pane) { case AuxiliaryPane.Settings: RightFrame.Navigate(new SettingsPage(this)); break; case AuxiliaryPane.QueueManagement: RightFrame.Navigate(new QueueManagement(this)); break; case AuxiliaryPane.Search: RightFrame.Navigate(new SearchPage(this)); break; case AuxiliaryPane.Notifications: RightFrame.Navigate(new NotificationPage(this)); break; case AuxiliaryPane.TrackInfo: RightFrame.Navigate(new TrackInfoPage(this)); break; case AuxiliaryPane.Lyrics: RightFrame.Navigate(new LyricsPage(this)); break; default: return; } if (!openleft) { DockPanel.SetDock(RightFrame, Dock.Right); } else { DockPanel.SetDock(RightFrame, Dock.Left); } RightFrame.Visibility = Visibility.Visible; var sb = InterfaceUtils.GetDoubleAnimation(0, width, TimeSpan.FromMilliseconds(100), new PropertyPath("Width")); sb.Begin(RightFrame); SelectedAuxiliaryPane = pane; RightFrame.NavigationService.RemoveBackEntry(); }
private void DockPanel_MouseEnter(object sender, MouseEventArgs e) { var fadeIn = InterfaceUtils.GetDoubleAnimation(0f, 1f, TimeSpan.FromMilliseconds(500), new PropertyPath("Opacity")); fadeIn.Begin(TitlebarDockPanel); var brightener = InterfaceUtils.GetDoubleAnimation(0.8, 1f, TimeSpan.FromMilliseconds(500), new PropertyPath("Opacity")); brightener.Begin(BackgroundDockPanel); ArtistTextBlock.Visibility = TitleTextBlock.Visibility = Visibility.Collapsed; ProgressIndicator1.Visibility = ProgressSlider.Visibility = ProgressIndicator2.Visibility = Visibility.Visible; }
public async void HideAuxilliaryPane(bool animate = true) { var sb = InterfaceUtils.GetDoubleAnimation(RightFrame.Width, 0, TimeSpan.FromMilliseconds(100), new PropertyPath("Width")); if (animate) { await sb.BeginStoryboardAsync(RightFrame); } else { sb.Begin(RightFrame); } RightFrame.Visibility = Visibility.Collapsed; RightFrame.Source = null; SelectedAuxiliaryPane = AuxiliaryPane.None; }