简体   繁体   中英

Changing the slider thumb size and color on Xamarin iOS

I'm trying to change the slider color and thumbsize on a Xamarin iOS project. I was able to do it pretty easily in Android through a custom renderer through the control's Thumb and ProgressDrawable properties, but the iOS control doesn't seem to have something similar, at least not that I've been able to find. Can anyone point me in the right direction? Thanks!

You can set the thumb slider to be an image of your choosing. I believe you can make that image as large as you want, thereby make the thumb size larger.

sliderImage.SetThumbImage(UIImage.FromFile("29_icon.png"), UIControlState.Normal);

This was taken from Xamarin's Recipe site...

https://developer.xamarin.com/recipes/ios/standard_controls/sliders/specify_slider_appearance/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM