Forum Xamarin.Forms
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Can i Recalculate old Value Property in my Custom Control

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


  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    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.

Sign In or Register to comment.