How to bind to a list of images

前端 未结 2 670
名媛妹妹
名媛妹妹 2020-12-07 05:35

I have changed my code to this:

the view:


            
                

        
2条回答
  •  感情败类
    2020-12-07 06:00

    so I basically created a loaded event on the listbox and added this code

      private void list_of_images_Loaded_1(object sender, RoutedEventArgs e)
        {
            ListBox lst = (ListBox)sender;
            lst.ItemsSource = new_Classifieds_list[0].ImageUrls;
        }
    

    which binds the itemssource of the listbox to the list of imageurls. since I cannot access the listbox from codebehind due to it being inside the panorama's itemstemplate

提交回复
热议问题