locked
Unable binding images and text to listbox

    Question

  • public void Load_Menu()
            {
                List<listboxitem> text = new List<listboxitem>();
                listboxitem items=new listboxitem();
                for(int i=0;i<Text_menu_array.Length&& i<Logo_menu_array.Length;i++)
                {
                    items.textmenu=i.ToString();
                }
                for(int j=0;j<Logo_menu_array.Length;j++)
                {
                    items.logomenu = j.ToString();
                }
                text.Add(items);
            }
    
    file class
    
     public class listboxitem
            {
                public string textmenu { get; set; }
                public string logomenu { get; set; }
            }


      private string[] Logo_menu_array = { "/Assets/star-6-48.ico", "/Assets/note-48.ico", "/Assets/note-48.ico", "medal-48.ico", "joystick-48.ico" };
            private string[] Text_menu_array={"Phổ biến trên YouTuBe","Âm nhạc","Thể thao","Trò chơi"};






    Monday, August 4, 2014 10:13 AM

All replies