Entry problem

MeccieMeccie USMember ✭✭
edited November 2017 in Xamarin.Forms

Hey Developer, im having some issues with an Entry wich i set to keyboard="Numeric"

here's my code.

    private void slidrSales_ValueChanged(object sender, ValueChangedEventArgs e)
    {
        EntrySalesValue.Text = slidrSales.Value.ToString("f2");
    }

    private void EntrySalesValue_TextChanged(object sender, TextChangedEventArgs e)
    {
        slidrSales.Value = Convert.ToDouble(EntrySalesValue.Text);
    }

above you see my code to make my Slider.value scale with the EntrySalesValue.text.

when testing/debugging i found an error wich i have no idea how to fix.
whenever i backspace the (numeric) entry to 0 and then press backspace again. the application crashes.
how can i let a user safely remove all numbers from the entry without crashing the application?

Best Answer

Answers

  • MeccieMeccie USMember ✭✭

    @ClintStLaurent oh yea makes sense :^)

    also thanks for explaining the error.

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    Happy to help.

Sign In or Register to comment.