Nir Hasson
Topic Author
Posts: 71
Joined: 10 Nov 2013, 21:20
Contact:

Items Control with Header

31 Mar 2015, 11:52

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
 
User avatar
sfernandez
Site Admin
Posts: 2984
Joined: 22 Dec 2011, 19:20

Re: Items Control with Header

02 Apr 2015, 14:07

Does the following image represent what you want to achieve?
CustomItemsControl.png
CustomItemsControl.png (10.25 KiB) Viewed 3005 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.
 
Nir Hasson
Topic Author
Posts: 71
Joined: 10 Nov 2013, 21:20
Contact:

Re: Items Control with Header

02 Apr 2015, 14:12

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 :)
 
User avatar
sfernandez
Site Admin
Posts: 2984
Joined: 22 Dec 2011, 19:20

Re: Items Control with Header

02 Apr 2015, 16:12

Great to hear that... it seems you are beginning to master NoesisGUI :P
We will be glad to see what you people are doing.
 
Nir Hasson
Topic Author
Posts: 71
Joined: 10 Nov 2013, 21:20
Contact:

Re: Items Control with Header

03 Apr 2015, 10:10

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

Who is online

Users browsing this forum: Bing [Bot] and 94 guests