コード例 #1
0
ファイル: LandingPage.xaml.cs プロジェクト: yongjan/musicmink
        private void HandlePlayerControlProgressBarBezzelManipulationCompleted(object sender, ManipulationCompletedRoutedEventArgs e)
        {
            double newWidth = e.Position.X;

            if (newWidth < 0)
            {
                newWidth = 0;
            }
            if (newWidth > PlayerControlProgressBarFull.ActualWidth)
            {
                newWidth = PlayerControlProgressBarFull.ActualWidth;
            }

            PlayerControlProgressBarCompleted.Width = newWidth;

            double percentage = newWidth / PlayerControlProgressBarFull.ActualWidth;

            LibraryViewModel.Current.PlayQueue.ScrubToPercentage(percentage);

            ProgressBarScrubView.Visibility = Visibility.Collapsed;

            PlayerControlProgressBarCompleted.SetBinding(Rectangle.WidthProperty, savedWidthBinding);
            savedWidthBinding = null;

            PlayerControlText.Text = string.Empty;
        }
コード例 #2
0
ファイル: LandingPage.xaml.cs プロジェクト: yongjan/musicmink
        private void HandlePlayerControlProgressBarBezzelManipulationStarted(object sender, ManipulationStartedRoutedEventArgs e)
        {
            ProgressBarScrubView.Visibility = Visibility.Visible;

            BindingExpression bindingExpression = PlayerControlProgressBarCompleted.GetBindingExpression(Rectangle.WidthProperty);

            savedWidthBinding = bindingExpression.ParentBinding;
        }
コード例 #3
0
ファイル: MainPage.xaml.cs プロジェクト: yongjan/musicmink
        private void HandlePlayerControlProgressBarBezzelManipulationStarted(object sender, ManipulationStartedRoutedEventArgs e)
        {
            BindingExpression bindingExpression = PlayerControlProgressBarCompleted.GetBindingExpression(Rectangle.WidthProperty);

            savedWidthBinding = bindingExpression.ParentBinding;

            BindingExpression textBindingExpression = ProgressTextBlock.GetBindingExpression(TextBlock.TextProperty);

            savedTextBinding = textBindingExpression.ParentBinding;

            PlayerControlProgressBarCompleted.Width = PlayerControlProgressBarCompleted.ActualWidth;
        }
コード例 #4
0
ファイル: MainPage.xaml.cs プロジェクト: yongjan/musicmink
        private void HandlePlayerControlProgressBarBezzelManipulationCompleted(object sender, ManipulationCompletedRoutedEventArgs e)
        {
            if (PlayerControlProgressBarFull.Width > 0)
            {
                double percentage = PlayerControlProgressBarCompleted.Width / PlayerControlProgressBarFull.Width;

                LibraryViewModel.Current.PlayQueue.ScrubToPercentage(percentage);
            }
            else
            {
                LibraryViewModel.Current.PlayQueue.ScrubToPercentage(0);
            }

            PlayerControlProgressBarCompleted.SetBinding(Rectangle.WidthProperty, savedWidthBinding);
            savedWidthBinding = null;

            ProgressTextBlock.SetBinding(TextBlock.TextProperty, savedTextBinding);
            savedTextBinding = null;
        }