我将一个组合框绑定到一个由web服务发送的用户集合。comboBox.comboSpec.SelectedItem.ToString()没有给出正确的值
当我尝试使用读选定的值:
string x = comboSpec.SelectedItem.ToString();
or
string x = comboSpec.SelectedValue.ToString();
我得到(断点模式):
Name | Value | Type
x | "UI.WebServiceReference.Users" | string
如何从下拉框中得到选择的值(如“管理员” )而不是绑定元素的类型?
发布你的xaml。 – 2011-12-13 18:42:08