is it possible to have ListBox
(which contains ScrollViewer
by default) and ListBoxItem
with ScrollViewer
?
I want to achieve next view:
And this ListBox should also support virtualization. (I know how enable it, I just wondering will it work if I use 2 scroll viewers?)
UPDATED:
I need to use ListBox.ItemTemplate
, since I'm binding ItemsSource
.
Thanks for tips.
Easy. (I've given you three ways to do this, one must be right!)
Through Xaml:
From C#:
This results in the following: (I've added a short comment just so you can see the difference, you can probably make the scroll bar go all the way across, but this is just an example.)
If your using Item Template: (I've never done this, so don't shoot me if its wrong! :) )
XAML:
Code Behind:
Output: