public void ApplyStyleInVariationStage(Slide contentSlide, float slideWidth, float slideHeight)
        {
            Logger.Log("Apply style in variation stage begins");
            var copiedPicture = LoadClipboardPicture();

            try
            {
                Designer.ApplyStyle(
                    IsInPictureVariation()
                    ? GetSelectedPictureInPictureVariation(
                        StylesVariationListSelectedId.Number)
                    : ImageSelectionListSelectedItem.ImageItem, contentSlide,
                    slideWidth, slideHeight);

                if (IsInPictureVariation())
                {
                    // select the picture if possible
                    var targetPicture = GetSelectedPictureInPictureVariation(
                        StylesVariationListSelectedId.Number);
                    if (targetPicture.ImageFile != StoragePath.NoPicturePlaceholderImgPath)
                    {
                        var indexForTargetPicture = ImageSelectionList.IndexOf(targetPicture);
                        if (indexForTargetPicture == -1)
                        {
                            ImageSelectionList.Add(targetPicture);
                            ImageSelectionListSelectedId.Number = ImageSelectionList.Count - 1;
                        }
                        else
                        {
                            ImageSelectionListSelectedId.Number = indexForTargetPicture;
                        }
                    }
                }
                View.ShowSuccessfullyAppliedDialog();
            }
            catch (Exception e)
            {
                View.ShowErrorMessageBox(PictureSlidesLabText.ErrorNoSelectedSlide);
                Logger.LogException(e, "ApplyStyleInVariationStage");
            }
            SaveClipboardPicture(copiedPicture);
            Logger.Log("Apply style in variation stage done");
        }
        public void ApplyStyleInPreviewStage(Slide contentSlide, float slideWidth, float slideHeight)
        {
            Logger.Log("Apply style in preview stage begins");
            var copiedPicture = LoadClipboardPicture();

            try
            {
                var targetDefaultOptions = OptionsFactory
                                           .GetStylesPreviewOption(StylesPreviewListSelectedItem.ImageItem.Tooltip);
                Designer.ApplyStyle(ImageSelectionListSelectedItem.ImageItem, contentSlide,
                                    slideWidth, slideHeight, targetDefaultOptions);
                View.ShowSuccessfullyAppliedDialog();
            }
            catch (Exception e)
            {
                View.ShowErrorMessageBox(PictureSlidesLabText.ErrorNoSelectedSlide);
                Logger.LogException(e, "ApplyStyleInPreviewStage");
            }
            SaveClipboardPicture(copiedPicture);
            Logger.Log("Apply style in preview stage done");
        }