public void SetSkin(JwSkinPackage pkg)
        {
            SetImages(
                pkg.GetNamedElement(PlaylistComponent, "item"),
                pkg.GetNamedElement(PlaylistComponent, "itemActive"),
                pkg.GetNamedElement(PlaylistComponent, "itemOver"),
                pkg.GetNamedElement(PlaylistComponent, "itemImage"));

            var outHex = pkg.GetSettingValue(PlaylistComponent, "fontcolor") ?? "0xffffff";

            outColor    = (outHex).HexToColor();
            overColor   = (pkg.GetSettingValue(PlaylistComponent, "overcolor") ?? outHex).HexToColor();
            activeColor = (pkg.GetSettingValue(PlaylistComponent, "activecolor") ?? outHex).HexToColor();
        }
Example #2
0
        public void SetSkin(JwSkinPackage pkg)
        {
            skinPackage = pkg;

            pkg.BindHoverButton(CaptionsButton, "dock", "button", "buttonOver");
            CaptionsButton.BadgeImage   = pkg.GetNamedElement("captions", "dockIcon");
            CaptionsButton.CaptionText  = "Subtitles\r\nOn";
            CaptionsButton.CaptionColor = (pkg.GetSettingValue("dock", "fontcolor") ?? "0xffffff").HexToColor();
        }
Example #3
0
        void BindSkins()
        {
            if (skinPackage == null)
            {
                return;
            }
            foreach (var child in PlaylistItemStack.Children.OfType <JwPlaylistItem>())
            {
                (child).SetSkin(skinPackage);
            }

            ScrollSlider.SetSkin(
                skinPackage.GetNamedElement(PlaylistComponent, "sliderRail"),
                skinPackage.GetNamedElement(PlaylistComponent, "sliderThumb"),
                skinPackage.GetNamedElement(PlaylistComponent, "sliderCapTop"),
                skinPackage.GetNamedElement(PlaylistComponent, "sliderCapBottom")
                );

            BackgroundImage.Source = skinPackage.GetNamedElement(PlaylistComponent, "background");

            BindActiveStates();
        }
Example #4
0
        void GetBackground(JwSkinPackage pkg)
        {
            var img = pkg.GetNamedElement(ControlBarComponent, "background");

            if (img == null)
            {
                return;
            }
            backgroundBrush = new ImageBrush {
                ImageSource = img,
                Stretch     = Stretch.Fill,
                AlignmentX  = AlignmentX.Left,
                AlignmentY  = AlignmentY.Top
            };
        }
Example #5
0
        JwSliderHorizontal BuildVolumeSlider(JwSkinPackage pkg)
        {
            volumeSlider = new JwSliderHorizontal();
            volumeSlider.SetSkin(
                pkg.GetNamedElement(ControlBarComponent, "volumeSliderRail"),
                pkg.GetNamedElement(ControlBarComponent, "volumeSliderBuffer"),
                pkg.GetNamedElement(ControlBarComponent, "volumeSliderProgress"),
                pkg.GetNamedElement(ControlBarComponent, "volumeSliderThumb"),
                pkg.GetNamedElement(ControlBarComponent, "volumeSliderCapLeft"),
                pkg.GetNamedElement(ControlBarComponent, "volumeSliderCapRight"));

            volumeSlider.BufferProgress = 0.75;
            volumeSlider.SliderProgress = 0.25;

            volumeSlider.TargetProportionChanged += VolumeSlider_TargetProportionChanged;

            volumeSlider.Margin = new Thickness(0);
            return(volumeSlider);
        }