wpf - why is it displaying class name instead of property? -
i have following combobox in xaml:
<combobox x:name="cmbcharacters1" horizontalalignment="left" margin="18,21,0,0" verticalalignment="top" width="136" selectedindex="0" height="32" rendertransformorigin="1.53,-1.281" itemssource="{binding characterentity}" selecteditem="{binding name}" selectedvalue="{binding tag}"/>
and following class , binding code
public class characterentity { public string name { get; set; } public string tag { get; set; } }
....
cmbcharacters1.itemssource = characters;//it list<characterentity>
when run displays class name instead of content of name property, doing wrong?
i think forgot use this: displaymemberpath="tag"
or "name" whatever wish display!
Comments
Post a Comment