locked
How to change Color from Slider on Xamarin Mac Platform? RRS feed

  • Question

  • User363924 posted

    The default color from a Slider on Xamarin Mac project is blue, I want to change it to green, So I have made a Custom Renderer, but unfortunately, I don't what to do inside the custom renderer, How can I change the color?

        using CustomSliderColor.MacOS;
        using Xamarin.Forms;
        using Xamarin.Forms.Platform.MacOS;
    
        [assembly: ExportRenderer(typeof(CustomSlider), typeof(CustomSliderRenderer))]
        namespace CustomSliderColor.MacOS
        {
            public class CustomSliderRenderer : SliderRenderer
            {
                protected override void OnElementChanged(ElementChangedEventArgs<Slider> e)
                {
                    base.OnElementChanged(e);
    
                    if (Control != null)
                    {
                        //What do I put here?????
                    }
                }
            }
        }
    
    Friday, July 13, 2018 9:14 PM

Answers

  • User363924 posted

    I answered my own question on MAC https://stackoverflow.com/questions/51332923/how-to-change-color-from-slider-on-xamarin-mac-platform

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Saturday, July 14, 2018 2:45 AM