Exemple #1
0
        private void UpdateColor()
        {
            var color   = ColoredEffect.GetColor(Element);
            var seekBar = Control as SeekBar;

            seekBar.ProgressDrawable.SetColorFilter(new PorterDuffColorFilter(color.ToAndroid(), PorterDuff.Mode.SrcIn));
            seekBar.Thumb.SetColorFilter(new PorterDuffColorFilter(color.ToAndroid(), PorterDuff.Mode.SrcIn));
        }
Exemple #2
0
        private void UpdateColor()
        {
            var color  = ColoredEffect.GetColor(Element);
            var slider = Control as UISlider;

            slider.ThumbTintColor = color.ToUIColor();
            var maxRed   = NormalizeValue(color.R * 255 + 100);
            var maxGreed = NormalizeValue(color.G * 255 + 100);
            var maxBlue  = NormalizeValue(color.B * 255 + 100);
            var minRed   = NormalizeValue(color.R * 255 + 10);
            var minGreed = NormalizeValue(color.G * 255 + 10);
            var minBlue  = NormalizeValue(color.B * 255 + 10);

            slider.MaximumTrackTintColor = UIColor.FromRGB((int)maxRed, (int)maxGreed, (int)maxBlue);
            slider.MinimumTrackTintColor = UIColor.FromRGB((int)minRed, (int)minGreed, (int)minBlue);
        }