locked
Can i Recalculate old Value Property in my Custom Control RRS feed

  • Question

  • User365289 posted

    I have Created this bindable property in my CustomSlider it is giving me double value, so i want to convert it into integer at the time of rendering. is it possible if it is please let me know

    public static readonly BindableProperty ValueProperty = BindableProperty.Create(nameof(Value), typeof(string), typeof(CustomSlider), string.Empty);

        public string Value
        {
            get { return (string)Value; }
            set { SetValue(ValueProperty, value); }
        }
    

    i want to use old value to convert into integer and return it as new value. I don't want to use Converter

    Friday, February 23, 2018 4:43 PM

All replies

  • User180523 posted

    Language barrier makes it hard to understand what you are asking.

    Slider takes a double and you're not going to change that.

    You could round it to a whole number if you don't want fractions.

    I have no idea what you're trying to do with the string property but talking about int and double.

    Friday, February 23, 2018 5:38 PM