Windows Phone Image Binding

后端 未结 2 1208
灰色年华
灰色年华 2021-01-26 19:26

I want to put images in my ListBox using Binding.

Below is the object containing the URI\'s:

_roomView.Room = new Room
        {
            Items = new          


        
2条回答
  •  终归单人心
    2021-01-26 20:18

    Instead of doing

    DataContext = _roomView;
    

    I did:

    Mylist.ItemsSource = _roomView.Room.Items;
    

    and in the XML:

    
    

    The above shows "ImageUri" instead of Room.Items.ImageUri since I am already passing in the Rooom.Items.

提交回复
热议问题