Skip to content
This repository has been archived by the owner on Oct 20, 2022. It is now read-only.

Latest commit

 

History

History

specify_slider_appearance

id title brief article sdk
C3E20584-4062-0062-8377-CB87BAB3E6E5
Specify Slider Appearance
This recipe shows how to specify the appearance of a slider, either with a custom image or colors.

Recipe

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;