コード例 #1
0
        private void OnClose()
        {
            if (captionSelectorView != null)
            {
                captionSelectorView.SelectedCaptionChanged -= captionSelectorView_SelectedCaptionChanged;
                captionSelectorView.Close     -= captionSelectorView_Close;
                captionSelectorView.Visibility = Visibility.Collapsed;
                vm = null;

                SettingsContainer.Children.Remove(captionSelectorView);
                SettingsContainer.Visibility            = Visibility.Collapsed;
                MediaPlayer.InteractiveDeactivationMode = deactivationMode;
                captionSelectorView = null;
            }
        }
コード例 #2
0
        void MediaPlayer_CaptionsInvoked(object sender, RoutedEventArgs e)
        {
            if (MediaPlayer.AvailableCaptions.Any())
            {
                captionSelectorView = new CaptionSelectorView();
                if (CaptionSelectorViewStyle != null) captionSelectorView.Style = CaptionSelectorViewStyle;

                vm = MediaPlayer.InteractiveViewModel;
                captionSelectorView.AvailableCaptions = vm.AvailableCaptions;
                captionSelectorView.SelectedCaption = vm.SelectedCaption;

                SettingsContainer.Visibility = Visibility.Visible;
                SettingsContainer.Children.Add(captionSelectorView);
                captionSelectorView.Close += captionSelectorView_Close;
                captionSelectorView.SelectedCaptionChanged += captionSelectorView_SelectedCaptionChanged;
                deactivationMode = MediaPlayer.InteractiveDeactivationMode;
                MediaPlayer.InteractiveDeactivationMode = InteractionType.None;
            }
        }
コード例 #3
0
        void MediaPlayer_CaptionsInvoked(object sender, RoutedEventArgs e)
        {
            if (MediaPlayer.AvailableCaptions.Any())
            {
                captionSelectorView = new CaptionSelectorView();
                if (CaptionSelectorViewStyle != null)
                {
                    captionSelectorView.Style = CaptionSelectorViewStyle;
                }

                vm = MediaPlayer.InteractiveViewModel;
                captionSelectorView.AvailableCaptions = vm.AvailableCaptions;
                captionSelectorView.SelectedCaption   = vm.SelectedCaption;

                SettingsContainer.Visibility = Visibility.Visible;
                SettingsContainer.Children.Add(captionSelectorView);
                captionSelectorView.Close += captionSelectorView_Close;
                captionSelectorView.SelectedCaptionChanged += captionSelectorView_SelectedCaptionChanged;
                deactivationMode = MediaPlayer.InteractiveDeactivationMode;
                MediaPlayer.InteractiveDeactivationMode = InteractionType.None;
            }
        }
コード例 #4
0
        private void OnClose()
        {
            if (captionSelectorView != null)
            {
                captionSelectorView.SelectedCaptionChanged -= captionSelectorView_SelectedCaptionChanged;
                captionSelectorView.Close -= captionSelectorView_Close;
                captionSelectorView.Visibility = Visibility.Collapsed;
                vm = null;

                SettingsContainer.Children.Remove(captionSelectorView);
                SettingsContainer.Visibility = Visibility.Collapsed;
                MediaPlayer.InteractiveDeactivationMode = deactivationMode;
                captionSelectorView = null;
            }
        }