How can I display both Button and Button Name in Listbox Item from Code behind?
- by Subhen
Hi I have the following code , which assign a list of custom radio buttons to my List Box.
List<RadioButton> listUserControlBtns = new List<RadioButton>();
customLocalFolderButton btnLocalFolder = new customLocalFolderButton();
customLocalFolderButton btnPlayListFolder = new customLocalFolderButton();
customVideoButton btnVideoFolder = new customVideoButton();
cutsomAudioButton btnMusicFolder = new cutsomAudioButton();
customImageButton btnImageFolder = new customImageButton();
listUserControlBtns.Add(btnLocalFolder);
listUserControlBtns.Add(btnPlayListFolder);
listUserControlBtns.Add(btnVideoFolder);
listUserControlBtns.Add(btnMusicFolder);
listUserControlBtns.Add(btnImageFolder);
listMainFolder.ItemsSource = listUserControlBtns;
Now . I am able to display the radio buttons inside the listbox but also I want to display the name of the radiobutton below the radiobutton itself.This should happen for all the radiobuttons inside the listbox.
I dont want to use binding in XAML . Your suggestions and solutions will help me in a great way.
Thanks,
Subhen