protected override async void Execute(IEnumerable <IVideoContent> items)
        {
            var anyCached = items.Any(x => VideoCacheManager.CheckCachedAsyncUnsafe(x.Id));

            if (anyCached)
            {
                var confirmed = await DialogService.ShowMessageDialog(
                    "ConfirmCacheRemoveContent_Multiple".Translate(),
                    $"ConfirmCacheRemoveTitle_Multiple".Translate(items.Count()),
                    acceptButtonText : "Delete".Translate(),
                    "Cancel".Translate()
                    );

                if (confirmed)
                {
                    foreach (var item in items)
                    {
                        await VideoCacheManager.CancelCacheRequest(item.Id);
                    }
                }
            }
            else
            {
                foreach (var item in items)
                {
                    await VideoCacheManager.CancelCacheRequest(item.Id);
                }
            }
        }
        private void VideoItemFlyout_Opening(object sender, object e)
        {
            object dataContext = Target.DataContext ?? (Target as SelectorItem)?.Content;
            var    content     = (dataContext as Interfaces.IVideoContent);

            if (content == null || (VideoItems?.Any() ?? false))
            {
                content     = VideoItems?.First();
                dataContext = VideoItems;
            }

            bool isMultipleSelection = VideoItems?.Count >= 2;

            var playlist = Playlist;


            // 視聴履歴
            RemoveWatchHisotryItem.Visibility = (content is IWatchHistory).ToVisibility();

            // ローカルプレイリスト
            if (playlist is LocalPlaylist localPlaylist)
            {
                RemoveLocalPlaylistItem.CommandParameter = dataContext;
                RemoveLocalPlaylistItem.Command          = localPlaylist.ItemsRemoveCommand;
                RemoveLocalPlaylistItem.Visibility       = Visibility.Visible;
            }
            else
            {
                RemoveLocalPlaylistItem.Visibility = Visibility.Collapsed;
            }

            // マイリスト
            if (playlist is LoginUserMylistPlaylist mylistPlaylist)
            {
                RemoveMylistItem.CommandParameter = dataContext;
                RemoveMylistItem.Command          = mylistPlaylist.ItemsRemoveCommand;
                RemoveMylistItem.Visibility       = Visibility.Visible;
            }
            else
            {
                RemoveMylistItem.Visibility = Visibility.Collapsed;
            }

            // キュー
            AddQueue.CommandParameter    = dataContext;
            RemoveQueue.CommandParameter = dataContext;
            if (isMultipleSelection)
            {
                AddQueue.Visibility    = VideoItems.All(x => HohoemaPlaylist.QueuePlaylist.Contains(x)).ToInvisibility();
                RemoveQueue.Visibility = VideoItems.Any(x => HohoemaPlaylist.QueuePlaylist.Contains(x)).ToVisibility();
            }
            else if (HohoemaPlaylist.QueuePlaylist.Contains(content))
            {
                AddQueue.Visibility    = Visibility.Collapsed;
                RemoveQueue.Visibility = Visibility.Visible;
            }
            else
            {
                AddQueue.Visibility    = Visibility.Visible;
                RemoveQueue.Visibility = Visibility.Collapsed;
            }

            // あとで見る
            AddWatchAfter.CommandParameter    = dataContext;
            RemoveWatchAfter.CommandParameter = dataContext;
            if (isMultipleSelection)
            {
                AddWatchAfter.Visibility    = VideoItems.All(x => HohoemaPlaylist.WatchAfterPlaylist.Contains(x)).ToInvisibility();
                RemoveWatchAfter.Visibility = VideoItems.Any(x => HohoemaPlaylist.WatchAfterPlaylist.Contains(x)).ToVisibility();
            }
            else if (HohoemaPlaylist.WatchAfterPlaylist.Contains(content))
            {
                AddWatchAfter.Visibility    = Visibility.Collapsed;
                RemoveWatchAfter.Visibility = Visibility.Visible;
            }
            else
            {
                AddWatchAfter.Visibility    = Visibility.Visible;
                RemoveWatchAfter.Visibility = Visibility.Collapsed;
            }


            // マイリスト
            AddToMylistSubItem.Items.Clear();
            AddToMylistSubItem.Visibility = UserMylistManager.IsLoginUserMylistReady ? Visibility.Visible : Visibility.Collapsed;
            if (UserMylistManager.IsLoginUserMylistReady)
            {
                AddToMylistSubItem.Items.Add(new MenuFlyoutItem()
                {
                    Text             = _localizedText_CreateNew,
                    Command          = CreateMylistCommand,
                    CommandParameter = dataContext
                });

                foreach (var mylist in UserMylistManager.Mylists)
                {
                    AddToMylistSubItem.Items.Add(new MenuFlyoutItem()
                    {
                        Text             = mylist.Label,
                        Command          = mylist.ItemsAddCommand,
                        CommandParameter = dataContext
                    });
                }
            }

            var visibleSingleSelectionItem = isMultipleSelection.ToInvisibility();

            OpenVideoInfoPage.Visibility      = visibleSingleSelectionItem;
            OpenOwnerVideosPage.Visibility    = visibleSingleSelectionItem;
            AddNgUser.Visibility              = visibleSingleSelectionItem;
            VideoInfoItemSeparator.Visibility = visibleSingleSelectionItem;


            //OpenOwnerSeriesPage.Visibility = (content?.ProviderType == Database.NicoVideoUserType.User && content?.ProviderId != null).ToVisibility();
            //OpenOwnerSeriesPage.CommandParameter = content?.ProviderId;

            Share.Visibility       = visibleSingleSelectionItem;
            CopySubItem.Visibility = visibleSingleSelectionItem;

            SusbcriptionSubItem.Visibility = visibleSingleSelectionItem;


            // プレイリスト
            LocalMylistSubItem.Items.Clear();
            LocalMylistSubItem.Items.Add(new MenuFlyoutItem()
            {
                Text             = _localizedText_CreateNew,
                Command          = CreateLocalMylistCommand,
                CommandParameter = dataContext
            });

            foreach (var localMylist in LocalMylistManager.LocalPlaylists)
            {
                LocalMylistSubItem.Items.Add(new MenuFlyoutItem()
                {
                    Text             = localMylist.Label,
                    Command          = localMylist.ItemsAddCommand,
                    CommandParameter = dataContext
                });
            }

            // 購読
            var susbcSourceConverter = new Subscriptions.SubscriptionSourceConverter();
            var subscSource          = susbcSourceConverter.Convert(content, typeof(SubscriptionSource), null, null);

            SusbcriptionSubItem.Items.Clear();
            SusbcriptionSubItem.Items.Add(new MenuFlyoutItem()
            {
                Text             = _localizedText_CreateNew,
                Command          = CreateSubscriptionGroupCommand,
                CommandParameter = subscSource
            });

            foreach (var subsc in SubscriptionManager.Subscriptions)
            {
                SusbcriptionSubItem.Items.Add(new MenuFlyoutItem()
                {
                    Text             = subsc.Label,
                    Command          = subsc.AddSource,
                    CommandParameter = subscSource
                });
            }

            // NG投稿者
            AddNgUser.Visibility    = AddNgUser.Command.CanExecute(content).ToVisibility();
            RemoveNgUser.Visibility = RemoveNgUser.Command.CanExecute(content).ToVisibility();


            // キャッシュ
            var isCacheEnabled          = VideoCacheManager.CacheSettings.IsEnableCache && VideoCacheManager.CacheSettings.IsUserAcceptedCache;
            var cacheEnableToVisibility = isCacheEnabled.ToVisibility();

            if (isMultipleSelection && isCacheEnabled)
            {
                // 一つでもキャッシュ済みがあれば削除ボタンを表示
                // 一つでも未キャッシュがあれば取得ボタンを表示
                var anyItemsCached    = VideoItems.Any(x => VideoCacheManager.IsCacheRequested(x.Id));
                var anyItemsNotCached = VideoItems.Any(x => !VideoCacheManager.CheckCachedAsyncUnsafe(x.Id));

                var notCachedToVisible = (anyItemsNotCached).ToVisibility();
                CacheRequest.Visibility             = notCachedToVisible;
                CacheRequest.CommandParameter       = dataContext;
                CacheRequestWithQuality.Visibility  = notCachedToVisible;
                DeleteCacheRequest.CommandParameter = dataContext;

                CacheSeparator.Visibility = Visibility.Visible;

                var cachedToVisible = (anyItemsCached).ToVisibility();
                DeleteCacheRequest.Visibility = cachedToVisible;
            }
            else if (isCacheEnabled)
            {
                var itemCached    = VideoCacheManager.IsCacheRequested(content.Id);
                var itemNotCached = !VideoCacheManager.CheckCachedAsyncUnsafe(content.Id);

                var notCachedToVisible = (itemNotCached).ToVisibility();
                CacheRequest.Visibility             = notCachedToVisible;
                CacheRequest.CommandParameter       = dataContext;
                CacheRequestWithQuality.Visibility  = notCachedToVisible;
                DeleteCacheRequest.CommandParameter = dataContext;

                CacheSeparator.Visibility = Visibility.Visible;

                var cachedToVisible = (itemCached).ToVisibility();
                DeleteCacheRequest.Visibility = cachedToVisible;
            }
            else
            {
                CacheRequest.Visibility            = Visibility.Collapsed;
                CacheRequestWithQuality.Visibility = Visibility.Collapsed;
                CacheSeparator.Visibility          = Visibility.Collapsed;
                DeleteCacheRequest.Visibility      = Visibility.Collapsed;
            }


            if (CacheRequestWithQuality.Items.Count == 0)
            {
                foreach (var quality in Enum.GetValues(typeof(NicoVideoQuality)).Cast <NicoVideoQuality>().Where(x => x.IsDmc() && x != NicoVideoQuality.Unknown))
                {
                    var command = App.Current.Container.Resolve <CacheAddRequestCommand>();
                    command.VideoQuality = quality;
                    var cacheRequestMenuItem = new MenuFlyoutItem()
                    {
                        Text    = quality.Translate(),
                        Command = command,
                    };
                    CacheRequestWithQuality.Items.Add(cacheRequestMenuItem);
                }
            }

            foreach (var qualityCacheRequest in CacheRequestWithQuality.Items)
            {
                (qualityCacheRequest as MenuFlyoutItem).CommandParameter = dataContext;
            }


            // 選択
            if (!VideoItemsSelectionContext.IsSelectionEnabled)
            {
                SelectionStart.Visibility = Visibility.Visible;
                SelectionEnd.Visibility   = Visibility.Collapsed;
                SelectionAll.Visibility   = Visibility.Collapsed;
            }
            else
            {
                SelectionStart.Visibility = Visibility.Collapsed;
                SelectionEnd.Visibility   = Visibility.Visible;
                SelectionAll.Visibility   = Visibility.Visible;
            }
        }