Page 1 of 1

Items Control with Header

Posted: 31 Mar 2015, 11:52
by Nir Hasson
I'm trying to expand an existing ItemsControl with my custom DataTemplate to include a Static Header.
I don't want to use the ListView option since I don't need the selection option and other visuals it has built in.

My ItemsControl uses a WrapPanel as its ItemsPanel with Vertical orientation.
The result on screen depends on the actual items I present.
Sometimes I have only one column but it can go up to 3 or 4 columns.

My questions is how can I achieve a static header for each one of the generated columns?
Thanks

Re: Items Control with Header

Posted: 02 Apr 2015, 14:07
by sfernandez
Does the following image represent what you want to achieve?
CustomItemsControl.png
CustomItemsControl.png (10.25 KiB) Viewed 4056 times
I think this will require some code to manually add the column headers to a custom ItemsControl template.

Or maybe a UserControl and using 2 ItemsControl: one for the headers, and the other for the wrapped items, exposing all the info via Bindings.

I can help you figure out how to structure the ViewModel and the xaml if you don't find the way.

Re: Items Control with Header

Posted: 02 Apr 2015, 14:12
by Nir Hasson
I already went on the 2 ItemsControls solution, it works fine for me.
One holds the actual data items as before and the new one layered above it holds special header data template...
Thanks for your help :)

Re: Items Control with Header

Posted: 02 Apr 2015, 16:12
by sfernandez
Great to hear that... it seems you are beginning to master NoesisGUI :P
We will be glad to see what you people are doing.

Re: Items Control with Header

Posted: 03 Apr 2015, 10:10
by Nir Hasson
Hi Fernandez,
I'm doing my best to get out the most from your great system.
We are doing a lot of cool stuff with it, all on our website's products area.

Here is a sample of one of the custom items control we are doing with it.
Image