Walter Fabio Simoni
Walter Fabio Simoni

Reputation: 5729

DataContext on two object

I would like to bind two list on a XAML page.

Is there possibilty to make a thing like this :

this.DataContext = {listOne,ListTwo} ;

Thanks a lot,

Best regards :)

Upvotes: 1

Views: 59

Answers (1)

MarcinJuraszek
MarcinJuraszek

Reputation: 125620

You can use anonymous object for that:

this.DataContext = new { One = listOne, Two = listTwo};

Upvotes: 1

Related Questions