You could use render target bitmap to turn each control into 16 Images. Then 
use a 4x4 UniformGrid to position the images, and overlay it on top. Or rather 
than RenderTargetBitmap, if the controls change dynamically, you could use a 
VisualBrush for the images.


From: [email protected] [mailto:[email protected]] On 
Behalf Of Greg Keogh
Sent: Monday, 6 December 2010 3:44 PM
To: 'ozSilverlight'; 'ozWPF'
Subject: Control thumbnails

This question is related to Silverlight and WPF, as I may need to use this 
technique in both sorts of apps.

My app's main <Grid> parent control can contain different types of child 
controls that display data in various ways. I internally maintain a 16-deep 
List<> of the children, I push a new child onto the top and make it visible, 
the others are pushed down and hidden and the oldest one drops off the end when 
it's full. So I effectively have an MRU list of up to 16 child controls 
available.

When the user hits a hotkey I want make all of the children visible and tile 
them in a nice 4 x 4 arrangement as thumbnails.

I'm just not sure what the best mechanism is to achieve this. At first I 
thought I'd do it manually: centre-position and scale transform each child to 
create a fake tiled arrangement and maintain it on size changes.

Before I do this manual coding, I thought I'd ask for ideas about better 
techniques.

Cheers,
Greg
_______________________________________________
ozwpf mailing list
[email protected]
http://prdlxvm0001.codify.net/mailman/listinfo/ozwpf

Reply via email to