locked
Two way binding with a converter causing an infinite loop RRS feed

  • Question

  • User313361 posted

    I have a field public string Test { get { return _test; } set { if (value != _test) { _test = value; if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs("Test")); } } } which is bound in xaml

    This works fine without the converter however as soon as I add the converter back in regardless of the code in the converter (which is why i havnt bothered posting the code for it, I have even tried it with convert and convert back both returning empty strings) No matter what happens as soon as I enter something into the field it starts an infinite loop of hitting ConvertBack. Each time it adds whatever i entered again. E.g. if I enter 1 into the entry it hits ConvertBack with value 1 and works fine. It then hits ConvertBack again with 11, it then hits it again with 111

    Even if I close the app it carries on entering ones into a search window until I press some other button and can not figure out why

    Tuesday, April 4, 2017 8:02 AM

All replies

  • User318880 posted

    I've made the same experience. I tested it with MvvmCross and plain Xamarin.Forms

    Tuesday, March 13, 2018 12:19 PM
  • User97487 posted

    @AxelMayer And...? what did you get?

    Thursday, August 6, 2020 9:05 AM