Wpf Combo Selection -
i have problem wpf combo box.
i bind list< pair < string, string> > (destinations) on combo :
my pair class defined :
/// <summary> /// class represents pair. /// </summary> public class pair<t, u> { #region properties /// <summary> /// gets or sets first value. /// </summary> public t first { get; set; } /// <summary> /// gets or sets second value. /// </summary> public u second { get; set; } #endregion #region methods /// <summary> /// default constructor /// </summary> public pair() { } /// <summary> /// constructor initialization. /// </summary> /// <param name="pfirst">the first value.</param> /// <param name="psecond">the second value.</param> public pair(t pfirst, u psecond) { this.first = pfirst; this.second = psecond; } #endregion };
i tried display second property of pair display of combo. tried :
displaymemberpath={binding destinations.second} doesn't work.
thanks answers.
displaymemberpath="second"
that should work each item pair
.
Comments
Post a Comment