I am developing an application in WPF and i need to create a UserControl whose layout and bindings will be created in Xaml file. When i run the program, it will fetch data from the database, create multiple user controls based on the returned rows and show all of the user controls on the window. In other words, each row will represent a new user control. I don't want to use datagrid or listview because returned data mustn't be displayed in rows.
Is there an efficient way to manage that?
Thanks in advance
Thanks for the reply Arjay.
Layout of the control should contain some textboxes, textblocks etc. then i should bind the results gathered from the database to those textboxes and textblocks. How can i use that control in a listview?
Thanks again Arjay. I made some searchs about datatemplates and i tried this before. It works well if i define the listbox or listview inside the window. But if i create my own user control based on listbox or listview and when i create a datatemplate in the user control it only creates one item and binds the first row coming from the database to the template. My usercontrol is like below;