This is a migrated thread and some comments may be shown as answers.

RadWrapPanel with non-grid-like behavior

1 Answer 25 Views
VirtualizingWrapPanel
This is a migrated thread and some comments may be shown as answers.
Musashi
Top achievements
Rank 1
Musashi asked on 09 May 2014, 04:18 PM
I'm sure the title is not the best at describing what I'm looking for...
Default behavior works like a grid where if in one row, a cell contains a large thing, the entire row must be that height.
The behavior I'm looking for is for a wrap panel to place items within it left-to-right first, then top-to-bottom, but more as a bucket then a grid.
For example,if the wrap panel has width of 2, and the first item is of width 1 and height 2, and the second and third item are of 1x1, then the default placement would be first item on top left, second item top right, and third item below the first.
[1][2]
[1]
[3]
What I'm looking for is first item on top left, second and third item both to the right of the first item.
[1][2]
[1][3] 

Is this possible? Or should I be looking at a different control maybe?

1 Answer, 1 is accepted

Sort by
0
Nick
Telerik team
answered on 14 May 2014, 10:31 AM
Hi Musashi,

RadVirtualizingWrapPanel aims to behave like an ordinary wrap panel, but offer a UI virtualization at the same time, in order to boost performance in more heavy scenarios. 
The requirement you have includes various arrange patterns and sizes which are not supported by RadVirtualizingWrapPanel. You have a couple of options in this case. 
The first one is to inherit from RadVirtualizingWrapPanel and implement your own Measure and Arrange logic which will override the default one. This is a solution that is as good as creating your own panel, since most of the Arrange logic is in Measure and Arrange overrides. 

The second approach can be used if you don't need UI virtualization. You can use an UniformGrid, which can arrange the items the way you configure it which will probably cover the requirements you have. 

Let me know if I can provide any additional information. 

Regards,
Nik
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
VirtualizingWrapPanel
Asked by
Musashi
Top achievements
Rank 1
Answers by
Nick
Telerik team
Share this question
or