Thursday 15 August 2013

c# - Win 8.1 ComboBox Display the "ToString" Function Result when the SelectedItem is Null or Empty String -



c# - Win 8.1 ComboBox Display the "ToString" Function Result when the SelectedItem is Null or Empty String -

i have xaml combobox this:

<combobox x:name="combobox" itemssource="{binding items}"/>

and bond info items defined below (the defaultviewmodel observabledictionary object used info binding):

defaultviewmodel["items"] = new[] {"this", "that", null};

the info binding working fine. when click "this" or "that" options, selected values displayed correctly; when click empty alternative (namely null), tostring() result of bound object (testapp.common.observabledictionary) shown instead of beingness empty.

what going wrong here? thanks!

c# windows-8 combobox windows-8.1

No comments:

Post a Comment