Esempio n. 1
0
        protected override void OnElementChanged(ElementChangedEventArgs <Xamarin.Forms.Slider> e)
        {
            base.OnElementChanged(e);
            if (e.OldElement != null || e.NewElement == null)
            {
                return;
            }

            view = (ThumbSlider)Element;
            if (!string.IsNullOrEmpty(view.ThumbImage))
            {
                Control.SetThumbImage(UIImage.FromFile(view.ThumbImage), UIControlState.Normal);
            }
            Control.ThumbTintColor        = Color.Gray.ToUIColor();
            Control.MinimumTrackTintColor = Color.Gray.ToUIColor();
        }
Esempio n. 2
0
        protected override void OnElementChanged(ElementChangedEventArgs <Xamarin.Forms.Slider> e)
        {
            base.OnElementChanged(e);
            if (e.OldElement != null || e.NewElement == null)
            {
                return;
            }
            view = (ThumbSlider)Element;
            if (!string.IsNullOrEmpty(view.ThumbImage))
            {
                try
                {
                    Control.SetThumb(Resources.GetDrawable(view.ThumbImage));

                    Control.Thumb.SetColorFilter(Android.Graphics.Color.DarkGray, PorterDuff.Mode.SrcIn);
                    Control.ProgressTintList = Android.Content.Res.ColorStateList.ValueOf(Android.Graphics.Color.Gray);
                    Control.ProgressTintMode = PorterDuff.Mode.SrcIn;
                }
                catch
                {
                }
            }
        }