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

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -