0

So I have a combo box that loads its items from one sql table and then sets values in a second SQL table based on what you select. Now of course this couldn't be that simple, both tables AND the combo box all show different data.

For example,

DB.Tab1 might have null values and based on those null values it loads combo boxes

DB.Tab2 Always has values in it but they are enums, which obviously aren't presented to the user

ComboBox has text values

<ComboBox SelectedValue="{Binding selectedItem, Converter={StaticResource converter}}" ItemSource="{Binding possiblecombos, Converter={StaticResource converter2}}"/>

Now with this setup I see something I can only refer to as "Spooky"

In my converter I have something to the effect of this,

usings....

namespace...

class... : IValueConverter

public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture){


}

public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture){


}

When ONE of these methods is break pointed I noticed that the OTHER methods parameters were active?

More specifically, if I break point within convert I can hover over the value argument in convert back and it is not only initialized, but contains the same data as in Convert.....

Now logic would dictate that if this method was not break pointed in and the scope of value is limited to that method, then how do they share a value?

DotNetRussell
  • 9,716
  • 10
  • 56
  • 111

0 Answers0