<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Implementing a VirtualizingPanel part 4: the goods!</title><link>http://blogs.msdn.com/dancre/archive/2006/02/16/implementing-a-virtualizingpanel-part-4-the-goods.aspx</link><description>Ok, we finally get to a full implementation with this post. I’ll be showing the implementation of a VirtualizingTilePanel. This is a layout is very similar to the one I used for the layout animation sample . For the sample, I’ve created a small test harness</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Implementing a VirtualizingPanel part 4: the goods!</title><link>http://blogs.msdn.com/dancre/archive/2006/02/16/implementing-a-virtualizingpanel-part-4-the-goods.aspx#534587</link><pubDate>Sat, 18 Feb 2006 06:56:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:534587</guid><dc:creator>Manny</dc:creator><description>Thank you for posting the series on VirtualizingPanel. &amp;nbsp;&lt;br&gt;&lt;br&gt;How would I get the VirtualizingTilePanel object from _itemsControl if I want to do something like changing the ChildSize property of the panel? &amp;nbsp;</description></item><item><title>re: Implementing a VirtualizingPanel part 4: the goods!</title><link>http://blogs.msdn.com/dancre/archive/2006/02/16/implementing-a-virtualizingpanel-part-4-the-goods.aspx#534914</link><pubDate>Sun, 19 Feb 2006 06:05:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:534914</guid><dc:creator>Manny</dc:creator><description>If I wire up the MouseDown event on the Border element in the DataTemplate, how would I identify which &lt;br&gt;item it represents in the ObservableCollection. &amp;nbsp;I am looking to see if I could determine the Border's index in the panel.&lt;br&gt;&lt;br&gt;Thanks,&lt;br&gt;Manny</description></item><item><title>re: Implementing a VirtualizingPanel part 4: the goods!</title><link>http://blogs.msdn.com/dancre/archive/2006/02/16/implementing-a-virtualizingpanel-part-4-the-goods.aspx#534915</link><pubDate>Sun, 19 Feb 2006 06:27:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:534915</guid><dc:creator>dancre</dc:creator><description>On the child size question, I have to admit that I tried to get some binding working, but failed. You should be able to get to it through the ItemsPanel property, although you might have to dig into the visual tree. Any suggestions from others would be great.&lt;br&gt;&lt;br&gt;For the mouse down, you could look at the DataContext to see which item it represnts. Another option is to handle this at the itemscontrol level. You can use a ListBox if you need all of that functionality, or just Selector if you want selection handled for you.</description></item><item><title>re: Implementing a VirtualizingPanel part 4: the goods!</title><link>http://blogs.msdn.com/dancre/archive/2006/02/16/implementing-a-virtualizingpanel-part-4-the-goods.aspx#535294</link><pubDate>Mon, 20 Feb 2006 09:23:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:535294</guid><dc:creator>Manny</dc:creator><description>I tried the following in the Window Loaded event implementation:&lt;br&gt;&lt;br&gt;FrameworkElementFactory frameworkElementFactory= itemsPanelTemplate.VisualTree;&lt;br&gt;...&lt;br&gt;binding.ElementName = &amp;quot;_slider&amp;quot;;&lt;br&gt;binding.Path = new PropertyPath((object)Slider.ValueProperty);&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br&gt;//this causes the following exception:&lt;br&gt;// &amp;quot;InvalidOperationException&amp;quot;&lt;br&gt;//&amp;quot;After a 'FrameworkElementFactory' is in use (sealed), it cannot be modified.&amp;quot;&lt;br&gt;frameworkElementFactory.SetBinding(VirtualizingTilePanel.ChildSizeProperty, binding);&lt;br&gt;&lt;br&gt;//this causes the same exception:&lt;br&gt;// &amp;quot;InvalidOperationException&amp;quot;&lt;br&gt;//&amp;quot;After a 'FrameworkElementFactory' is in use (sealed), it cannot be modified.&amp;quot;&lt;br&gt;frameworkElementFactory.SetValue(VirtualizingTilePanel.ChildSizeProperty, 50);&lt;br&gt;&lt;br&gt;Any ideas on how to get around this?</description></item><item><title>re: Implementing a VirtualizingPanel part 4: the goods!</title><link>http://blogs.msdn.com/dancre/archive/2006/02/16/implementing-a-virtualizingpanel-part-4-the-goods.aspx#536103</link><pubDate>Tue, 21 Feb 2006 19:10:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:536103</guid><dc:creator>dancre</dc:creator><description>I think there may be an bug preventing this binding from working. Keep an eye out for a newer build...</description></item><item><title>re: Implementing a VirtualizingPanel part 4: the goods!</title><link>http://blogs.msdn.com/dancre/archive/2006/02/16/implementing-a-virtualizingpanel-part-4-the-goods.aspx#543205</link><pubDate>Sat, 04 Mar 2006 00:37:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:543205</guid><dc:creator>mlaroche</dc:creator><description>Hi,&lt;br&gt;&lt;br&gt; &amp;nbsp; &amp;nbsp;First, thanks for those enligthening posts...&lt;br&gt;&lt;br&gt; &amp;nbsp; &amp;nbsp;I'd like to challenge you with 1 or 2 questions:&lt;br&gt;&lt;br&gt; &amp;nbsp; &amp;nbsp;First Question: How would you deal with child UIElements of different size (in your example, everybody has the same size)?&lt;br&gt;&lt;br&gt; &amp;nbsp; &amp;nbsp;Let's take an example where a text control wraps long text around, making the control taller...&lt;br&gt;&lt;br&gt; &amp;nbsp; &amp;nbsp;Wouldn't it be troublesome since you wouldn't be able to calculate the size of the panel efficiently. Wouldn't it also make the scrolling gestion a bit troublesome?&lt;br&gt;&lt;br&gt; &amp;nbsp; &amp;nbsp;Second Question: Take the example of a 'virtualizing' treeview, &amp;nbsp;how would you handle the Expansion/Collapsing of the nodes?&lt;br&gt;&lt;br&gt; &amp;nbsp; If you could help me out a little on those topics, I would appreciate greatly...&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</description></item><item><title>re: Implementing a VirtualizingPanel part 4: the goods!</title><link>http://blogs.msdn.com/dancre/archive/2006/02/16/implementing-a-virtualizingpanel-part-4-the-goods.aspx#543680</link><pubDate>Sat, 04 Mar 2006 20:31:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:543680</guid><dc:creator>dancre</dc:creator><description>First question: Yes, this is difficult if you support pixel-based scrolling for the reasons you mention. It might be doable if you could calculate the heights based on the data, but if you need to do something like wrap text, thata wouldn't be possible. Another possibility is to use approximate values. And, another solution (what VirtualizingStackPanel does) is scroll based by element, not by pixel. That way, you just need to know how many elements there are.&lt;br&gt;&lt;br&gt;Second question: I think you could do this if you kept track of the expanded/collapsed state outside of the UI. I haven't done much with the tree view stuff though. so I don't know the data structures involved very well. If you can provide a bit more info on what you have in mind, I could try to be more help.</description></item><item><title>re: Implementing a VirtualizingPanel part 4: the goods!</title><link>http://blogs.msdn.com/dancre/archive/2006/02/16/implementing-a-virtualizingpanel-part-4-the-goods.aspx#544570</link><pubDate>Mon, 06 Mar 2006 20:00:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:544570</guid><dc:creator>mlaroche</dc:creator><description>Regarding the first item:&lt;br&gt;&lt;br&gt;Well, I had already identified that Item Scrolling would solve all the scrolling issues... as I said, my primary goal was to challenge your design a little... Based on that, after giving some toughts into it over the weekend... We could emulate the &amp;quot;nice looking&amp;quot; per pixel scrolling by using proportional scrolling... &amp;nbsp;By proportional, I mean to give a fixed value to each item and to scroll by proportions of an item...&lt;br&gt;&lt;br&gt;If we give a proportion of 100 (100%) for each item, then independently of the item's size, we could scroll trough the item and have a &amp;quot;pixel&amp;quot; scrolling feel... Only noticeable side effect would be the &amp;quot;scrolling acceleration/decelerations&amp;quot; feeling &amp;nbsp;for much &amp;quot;larger or smaller&amp;quot; items when scrolling... &amp;nbsp;For almost similar item size, I don't think it would be noticeable at all.&lt;br&gt;&lt;br&gt;Since this solution is based on the number of items and not the particularities of items themselves, it would be pretty doable...&lt;br&gt;&lt;br&gt;Regarding the second point:&lt;br&gt;&lt;br&gt; &amp;nbsp; I provided the tree view example because it has a well known behavior (expansion/collapsing)... In fact, I'm looking into virtualization to create custom data controls which items could have child items.. I'm not directly interested in the tree view itself.&lt;br&gt;&lt;br&gt; &amp;nbsp; In any way, I suppose that if the &amp;quot;child&amp;quot; items are nested under the &amp;quot;items&amp;quot; of the virtualizing control, the measure and arrange of the control will ensure that Expansion/Collapsing of the items is done correctly. &lt;br&gt;&lt;br&gt; &amp;nbsp; Or alternativelly, I suppose using HierarchicalDataTemplates would do the job, &amp;nbsp;except for the collapsing/expansion.&lt;br&gt;&lt;br&gt; &amp;nbsp; </description></item><item><title>WPF: Adventures in Virtualisation</title><link>http://blogs.msdn.com/dancre/archive/2006/02/16/implementing-a-virtualizingpanel-part-4-the-goods.aspx#635106</link><pubDate>Sat, 17 Jun 2006 12:48:46 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:635106</guid><dc:creator>Mike Taulty's Weblog</dc:creator><description /></item><item><title>Hello Tuesday</title><link>http://blogs.msdn.com/dancre/archive/2006/02/16/implementing-a-virtualizingpanel-part-4-the-goods.aspx#678409</link><pubDate>Wed, 26 Jul 2006 03:50:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:678409</guid><dc:creator>Okoboji: a lake, a mythical university, Kevin Moore's blog</dc:creator><description>Control Licensing in Cider (WPF designer for VS)
James provides some
great 
information on supporting...</description></item><item><title>ItemsControl:  'P' is for Panel</title><link>http://blogs.msdn.com/dancre/archive/2006/02/16/implementing-a-virtualizingpanel-part-4-the-goods.aspx#7619588</link><pubDate>Mon, 11 Feb 2008 23:21:18 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7619588</guid><dc:creator>Ask Dr. WPF</dc:creator><description>&lt;p&gt;Let's continue our exploration of WPF through the medium of the ItemsControl class. I know I promised to write 'G' is for Generator next, but after giving it more consideration, I've decided t ...&lt;/p&gt;
</description></item></channel></rss>