Created
September 18, 2017 09:18
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[assembly: ExportRenderer(typeof(AudioSlider), typeof(AudioSliderRenderer))] | |
namespace KickassUI.Spotify.iOS.Renderers | |
{ | |
public class AudioSliderRenderer : SliderRenderer | |
{ | |
protected override void OnElementChanged(ElementChangedEventArgs<Slider> e) | |
{ | |
base.OnElementChanged(e); | |
if (Control != null) | |
{ | |
Control.MinimumTrackTintColor = UIColor.White; | |
Control.MaximumTrackTintColor = UIColor.FromRGBA(173, 174, 178, 40); | |
if (e.NewElement != null && (e.NewElement as AudioSlider).HasThumb) | |
{ | |
Control.SetThumbImage(UIImage.FromBundle("small_slider"), UIControlState.Normal); | |
} | |
else | |
{ | |
Control.SetThumbImage(new UIImage(), UIControlState.Normal); | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment