How to create a custom Panel virtualization on Windows Phone 8.1 / Windows 10?

I am trying to do this on Windows 10 and Windows Phone 8.1 (app link) :

I have my own FluidPanel class that extends Panel methods and overrides MeasureOverride and ArrangeOverride. The goal is to create the appearance of Google Keep . Ok, it works fine.

But, since I use the base panel as the ItemsPanelTemplate element , the Reorder elements do not work. In addition, transistors do not work and are not virtualized.

So, I would like to know how to create a custom panel that reorders items and virtualizes just like the GridView ItemsWrapGrid .

I tried to extend the VirtualizingPanel class, but it continues to show me this error, which looks like an error:

'VirtualizingPanel' does not contain a constructor that accepts 0 arguments

Hope someone can give some guidance.

+5
source share
1 answer

You cannot inherit from "VirtualizingPanel" in C # because it is a Windows Runtime class and there is no constructor function displayed by Windows metadata (windows.winmd file). UI virtualization is just a concept, it will be a little complicated, but it can be implemented from scratch. I think the blog series implementing the virtual dashboard in WPF will be a good start.

Part number 1: http://blogs.msdn.com/b/dancre/archive/2006/02/06/526310.aspx

Part number 2: http://blogs.msdn.com/b/dancre/archive/2006/02/13/531550.aspx

Part No. 3: http://blogs.msdn.com/b/dancre/archive/2006/02/14/532333.aspx

PS: the blog is dedicated to WPF, but the basic idea is the same.

+2
source

All Articles