public async void OpenPopupWindow()
        {
            var imageSizeWindow = await App.Configuration.GetImageSizeByIDAsync(ImageIdentity.WORKOUT_VIDEO_WINDOW);

            int height = 340, width = 360;

            if (imageSizeWindow != null)
            {
                height = (int)imageSizeWindow.Height;
                width  = (int)imageSizeWindow.Width;
            }

            if (_deviceInfo.WidthPixels != 0)
            {
                var d = _deviceInfo.ScaledDensity;
                width  = _deviceInfo.WidthPixels / (int)d;
                width -= 60;
                height = width - 10;
            }

            CloseWindow();
            _popupLayout = Content as PopupLayout;
            var stackLayout = new StackLayout()
            {
                HorizontalOptions = LayoutOptions.FillAndExpand,
                VerticalOptions   = LayoutOptions.Center,
                BackgroundColor   = Palette._Transparent,
                Orientation       = StackOrientation.Vertical,
                HeightRequest     = height,
                WidthRequest      = width
            };
            StackLayout stackLayoutTitle = new StackLayout()
            {
                HorizontalOptions = LayoutOptions.CenterAndExpand,
                VerticalOptions   = LayoutOptions.End,
                Orientation       = StackOrientation.Horizontal,
                BackgroundColor   = Palette._Transparent,
            };
            //Label labelTitle = new Label()
            //{
            //    Text = _model.CurrentMediaContent.MediaTitle,
            //    LineBreakMode = LineBreakMode.TailTruncation,
            //    Style = (Style) App.CurrentApp.Resources["labelStyleInfoHeading"],
            //    HorizontalOptions = LayoutOptions.Start,
            //    Margin = new Thickness(3, 0, 0, 0)
            //};
            //Label labelSets = new Label()
            //{
            //    Text = (_model.CurrentMediaContent.SetsAndRepeats != null &&
            //            _model.CurrentMediaContent.SetsAndRepeats.Trim().Length > 0
            //        ? " [" + _model.CurrentMediaContent.SetsAndRepeats + "]"
            //        : ""),
            //    LineBreakMode = LineBreakMode.TailTruncation,
            //    Style = (Style) App.CurrentApp.Resources["labelStyleInfoHeading"],
            //    HorizontalOptions = LayoutOptions.StartAndExpand,
            //};
            //var imageSize = App.Configuration.GetImageSizeByID(ImageIdentity.TOP_BAR_CLOSE);
            //Image imageClose = new Image()
            //{
            //    Source = ImageResizer.ResizeImage(TextResources.icon_close, imageSize),
            //    Style = (Style) App.CurrentApp.Resources["imagePopupClose"],
            //    Margin = new Thickness(0, 2, 5, 2)
            //};

            var closeImageSize = App.Configuration.GetImageSizeByID(ImageIdentity.BADGE_HINT_WINDOW_CLOSE);
            var closeImage     = new Image()
            {
                Source            = ImageResizer.ResizeImage(TextResources.icon_BadgeCloseCircle, closeImageSize),
                Style             = (Style)App.CurrentApp.Resources["imageBadgeHintClose"],
                HorizontalOptions = LayoutOptions.Center,
                VerticalOptions   = LayoutOptions.Center,
                Margin            = new Thickness(0),
                WidthRequest      = 60,
                HeightRequest     = 60
            };

            GestureRecognizer gestureRecognizer = new TapGestureRecognizer()
            {
                Command = new Command(CloseWindow)
            };

            closeImage.GestureRecognizers.Add(gestureRecognizer);
            //if (imageSize != null)
            //{
            //    imageClose.HeightRequest = imageSize.Height;
            //    imageClose.WidthRequest = imageSize.Width;
            //}

            //stackLayoutTitle.Children.Add(labelTitle);
            //stackLayoutTitle.Children.Add(labelSets);
            stackLayoutTitle.Children.Add(closeImage);

            var videoView = new VideoView()
            {
                HeightRequest     = height,
                WidthRequest      = width,
                HorizontalOptions = LayoutOptions.CenterAndExpand,
                VerticalOptions   = LayoutOptions.CenterAndExpand,
                BackgroundColor   = Palette._Transparent
            };

            videoView.SetBinding(VideoView.SourceProperty,
                                 new Binding("Source", BindingMode.OneWay, null, null, "{0}"));

            stackLayout.Children.Add(stackLayoutTitle);
            stackLayout.Children.Add(videoView);
            _popupLayout.ShowPopup(stackLayout);
            _model.UpdateCurrentMedia();
        }