Closed sun8134 closed 11 years ago
I assume "name" is a property from your ViewModel, correct? Is it really "name" or should it be "Name"? Take a look in the Output window in Visual Studio and check if there is an Binding error message that may explain why the value is null.
yes the "name" is a property of my ViewModel
And I found that in each binding,the "public override object Convert" method will run twice the first time the values[0] is null and the second time it will have the correct value
That is actually expected behavior, as PropertyChanged events get raised each time a property value changes.
In this case, if the MultiBindingBehavior contains 2 bindings, it will raise the Convert() method twice once per each PropertyChanged event, and at startup, I guess a PropertyChanged event is raised for each of the binded properties.
I used MultiBindingBehavior in wp7.5, the xaml is here:
but in "public override object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)", the values[0] is null...
how can I get the value in databinding?
Thinks