0
down vote
favorite I am a programmer for winforms and asp.net. A new-comer to WPF application development.
I wish to thank in advance for any help rendered to my query,
I am working on a application for Banking. My job profile is to develop reusable usercontrols for the application.
An example would be to make a Simple numeric input box which has Max and Min number properties. So the control pops an error if the number entered is not within a range. (ofcourse there is much more to this control :-)
On similar lines. I have to develop a listview user control with Two properties.
- A comma separated values of column headers
- A comma separated values of data to add
My colleague, now places this usercontrol on window (as known in WPF). and passes the above parameters to the listview control.
My coding ensures that the columns are placed and data is added. In winforms this is a simple process. In WPF i was able to achieve it for known columns by defining beforehand in observablecollection or otherwise using
SamplelistView.Items.Add(new { FirstName = "test1", LastName = "ABX", EmployeeNumber = "AAA111"});
However in the above mentioned command, Firstname,Lastname are previously known columns.
Is there any command like,adding data as a array or adding data directly to columns without binding to a collection. OR is there a way to add columns to observablecollections at runtime.
Pls. excuse my limited exposure on nomenclature and otherwise.