Hi,
I have tried severalexamples of styled listboxes, but cannot find any examples of how to interact with the listbox as if it was a standard control.
I have tried severalexamples of styled listboxes, but cannot find any examples of how to interact with the listbox as if it was a standard control.
I can get a styled listbox to look nice on a c# window, but cannot find how to attach it to data, or how to select and use items within it.
The only way I can see items are those added manually in design time.
Please could someone point me in the right direction to accomplish this, or to suggest a sample application using a styled listbox and styled listitems ?
Many Thanks for any help.
Andy TrayfordPosted Feb 2, 2014, 4:17 PM
I found this at the time of asking the question. This example from mcirosoft!! (first time ive found anything useful on their site!). This sample uses Data templates and XML-Dataprovider, but not sure how this would work for database related content ?
http://msdn.microsoft.com/en-us/library/ms752299%28v=vs.100%29.aspx
Again.. Many thanks, I'll get back soon to give further feedback.
Regards
Andy
Biswa Pujarini MohapatraPosted Jan 31, 2014, 10:04 PM
it will help you binding data. you need to use Itemcontainerstyle Property
http://stackoverflow.com/questions/1305157/wpf-xaml-how-to-style-a-listboxitem-using-binding-on-property-of-listbox-items