Specify Slider Appearance

PDF for offline use
Sample Code:
Related Articles:
Related SDKs:

Let us know how you feel about this

Translation Quality


This recipe shows how to specify the appearance of a slider, either with a custom image or colors.


A slider control can be customized by changing the image used for the drag-able portion, or by changing the colors of the control, like this:

See the Specify Slider Value recipe for instructions on creating slider controls. To change the appearance of a slider:

  1. To set the slider’s “thumb” to an image:
sliderImage.SetThumbImage(UIImage.FromFile("29_icon.png"), UIControlState.Normal);
  1. Or to set the colors of each different element of a slider:
sliderColor.ThumbTintColor = UIColor.Red;
sliderColor.MinimumTrackTintColor = UIColor.Orange;
sliderColor.MaximumTrackTintColor = UIColor.Yellow;

Xamarin Workbook

If it's not already installed, install the Xamarin Workbooks app first. The workbook file should download automatically, but if it doesn't, just click to start the workbook download manually.