-2

I have a combobox bound to

list<Tuple<Myobj1,MyObj2>>

I am here trying to find if we can tell combobox by some means that display member is MyObj1.Prop1 concatenated with MyObj2.Prop2

I cant find a direct way to do it, can do it with converters and ways but want to know if we can bind displaymemberPath somehow ?

thanks

Muds
  • 4,006
  • 5
  • 31
  • 53
  • would appreciate If I get reason for down vote really, I might be able to frame it in more understandable way for you .. – Muds Mar 25 '15 at 15:45

1 Answers1

-1

I'd use a keyvalue pair

    List<KeyValuePair<string, int>> Foo = new List<KeyValuePair<string, int>>();

    public void DoStuff()
    {
        Foo.Add(new KeyValuePair<string, int>("bar", 1));
        var bar = Foo[0].Key;
        var intOne = Foo[0].Value;
    }
Justin
  • 414
  • 4
  • 8