Yet I must admit I don't really understand why this happens. I mean I can understand why the scrolling behaves strange in such a scenario but why setting the attached property ScrolViewer.CanContentScroll=False fixes this is still magic for me... Any idea?
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to wpf-di...@googlegroups.com
Wouldn't that cause the scrollviewer to measure the itemshost panel with infinity and therefore lose any virtualization because you're basically causing the itemspanel to size to the content and have the scrollviewer implement the scrolling rather than delegate to the itemspanel's IScrollInfo impl?
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to wpf-di...@googlegroups.com
I don't think that this has anything to do with Virtualization because I tried setting a StackPanel as ItemsPanel to the ListView to check if it was because of Virtualization, but this did not change anything. I am really confused... I have no idea how this attached property is fixing this!
Andrew
unread,
Nov 18, 2008, 2:11:42 PM11/18/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to wpf-di...@googlegroups.com
Well its not directly related to virtualization but what I'm saying is that you will lose virtualization. If you snoop on your listview after setting CanContentScroll, I suspect that you will find that the ItemsPanel is no longer just the size of visible area of the ListView - instead it is the size required to show all the items (regardless of what's in view) because the scrollviewer is doing the scrolling which knows nothing about the items - just the size that the itemspresenter (i.e. the itemspanel it contained) reported it wanted to be if it had all the room (i.e. infinity).
Sent: Tuesday, November 18, 2008 1:47:28 PM Subject: [WPF Disciples] Re: Scollbars in dynamic content ItemsControl fix
Marlon Grech
unread,
Nov 18, 2008, 2:14:50 PM11/18/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to wpf-di...@googlegroups.com
Yea, ok now I am understanding better. I think that this is totally acceptable in my case. I will edit the post to say that this solution will drop the Virtualization support. Thanks dude :)