XAML Handling sizing between Stackpanel and inner ItemsControl problem (Vertical Alignment Stretch)
Hello, I am new to WPF and XAML and am running into a sizing/layout issue. If you see any faults in my approach please feel free to comment better ideas, trying to get better at WPF as quick as possible for my job.
Problem:
an ItemsControl that is displaying my ListView and its contents dynamically is not stretching vertically properly. Works as expected when I remove the ItemsControl which is not good as I do not
Goal:
I am trying to create a functionality in which multiple ListViews will be displayed horizontally. I want the Listviews to be vertically stretched so that when I resize the window, the middle UserControl View of my application expands to reveal more info.
Code:
- With ItemsControl (Is failing): https://hatebin.com/dqrmhcjpya see image 1
- Without ItemsControl (Is Working) https://hatebin.com/tvjmlcywhg see image 2
6 Replies
so, you want a list of ListViews
with the ListViews laid-out horizontally
and the items within them laid-out vertically
^Correct
well, for starters, your
StackPanel
isn't accomplishing anything
it only has one item
what you're probably looking for is....
Thanks this worked - so the ItemsPanelTemplate is what arranges the items inside an Item Control?
I havent seen a ItemsPanelTemplate yet so not sure what that is doing
yes, exactly
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.