New to the WPF world and need to implement a dynamic column view.
I can conceptually visualize the idea, but am not able to turn this into an implementation.
StackPanel -> ListView -> Textboxes.
The whole idea is to display profiles as columns for a selected entity, based on the entity selected, the profiles can change, so I want to display profiles as dynamic columns.
A Profile will have 54 items, which can be represented as a textbox vertically.
So if i have an observable collection that represents the profile items (54 items), when bound to a usercontrol and user control loaded into the listview vertically.
So each profile added will be added horizontally on the stack panel, so i can get all profiles as dynamic columns.
Any ideas or pointers on how i can implement this via xaml, and how should my model objects should look like ?
Hope i have put my idea across properly 🙂
** adding a very quick hand sketch of whats required.
The columns col1..col2….. are ideally a collection that has the data to be displayed in the textboxes denoted by the rectangle boxes inside the column.
Each colum across can be varied.
so the data I get from my service ideally is a Collection of Collection.
so The first collection contains the Col1..Col2..Col3… items…
At first thought this sounds very much like a grid, but the datamodel does not fit a grid display style.
Each of those Col1..col2..col3 is inside the first collection as another collection.
I have managed to solve the layout and display of the data as required above, thanks to SO and a mix and match of various answers got me this.
So the below XAML creates any number of listitems horizontally.