A processor-intensive way might be to set up your grid with 4 equally spaced 
rows and columns (each Size: 1*). Wrap each control in viewbox, then when the 
user hits the key, place each control (viewbox) in a table cell, sized to fit 
the cell. 

Downsides:
- processor intensive
- The controls are still 'active' - might not be what you want
- Scaling down a control to 1/16 its original size is likely to result in a 
squashed-bug-like appearance if you don't strip out detail

Shanemo


-----Original Message-----
From: ozsilverlight-boun...@ozsilverlight.com 
[mailto:ozsilverlight-boun...@ozsilverlight.com] On Behalf Of Stephen Price
Sent: Monday, 6 December 2010 4:55 PM
To: ozSilverlight
Subject: Re: Control thumbnails

You could look at the wrappanel in the Silverlight toolkit. That would handle 
your wrapping in a 4 x 4 grid (if you limit the width).

If you want to get fancy you could write your own custom control, basing it on 
a Panel. That way you can have full control over how your panel displays its 
content. Thats assuming the wrap panel doesn't already do what you want. Also 
not sure if WPF has an equivalent. I'd assume so but if not you could get the 
source from the SL version/toolkit.

cheers,
Stephen

On Mon, Dec 6, 2010 at 1:43 PM, Greg Keogh <g...@mira.net> wrote:
> 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
>
> _______________________________________________
> ozsilverlight mailing list
> ozsilverlight@ozsilverlight.com
> http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight
>
>
_______________________________________________
ozsilverlight mailing list
ozsilverlight@ozsilverlight.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight
_______________________________________________
ozsilverlight mailing list
ozsilverlight@ozsilverlight.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight

Reply via email to