Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Avalon

Vista - Multiple layers of layout?

 
 
Old 01-31-2006   #1 (permalink)
Jason Dolinger


 
 

Multiple layers of layout?

Hi all,

Starting to get into even messier questions now... Is it possible to
have multiple layers of layout going on in the application? Let's say
that I'm using a grid layout to neatly and symmetrically define a number
of controls and elements. On top of that, I wish to randomly scattered
some other overlayed things on top. That second layer really doesn't
fit into the idea of a grid layout as it is somewhat irregular, what I
really need is to manage the arrangement of those myself, which would
lend itself to an canvas.

So given that scenario, can you give a window both a grid layout and a
canvas layout, and put different controls/visuals into the different
layers? Or perhaps the answer is using the canvas for the base layout,
and then nesting a full window sized grid within that canvas. Any thoughts?

Thanks!
Jason

My System SpecsSystem Spec
Old 01-31-2006   #2 (permalink)
Drew Marsh


 
 

Re: Multiple layers of layout?

Jason Dolinger wrote:

> Starting to get into even messier questions now... Is it possible to
> have multiple layers of layout going on in the application? Let's say
> that I'm using a grid layout to neatly and symmetrically define a
> number of controls and elements. On top of that, I wish to randomly
> scattered some other overlayed things on top. That second layer
> really doesn't fit into the idea of a grid layout as it is somewhat
> irregular, what I really need is to manage the arrangement of those
> myself, which would lend itself to an canvas.
>
> So given that scenario, can you give a window both a grid layout and a
> canvas layout, and put different controls/visuals into the different
> layers? Or perhaps the answer is using the canvas for the base
> layout, and then nesting a full window sized grid within that canvas.
> Any thoughts?


A Grid supports multiple layers within the same cell, so what you would do
is something like this:

<Window>
<Grid>
<Grid><!-- this is the grid you talk about for structured layout --></Grid>
<Canvas><!-- this is the canvas you talk about for positioned layout
--></Canvas>
</Grid>
</Window>

HTH,
Drew
___________________________________
Drew Marsh
Chief Software Architect
Mimeo.com, Inc. - http://www.mimeo.com
Microsoft C# / WPF MVP
Weblog - http://blog.hackedbrain.com/


My System SpecsSystem Spec
Old 01-31-2006   #3 (permalink)
Jason Dolinger


 
 

Re: Multiple layers of layout?

Drew Marsh wrote:
> Jason Dolinger wrote:
>
>> Starting to get into even messier questions now... Is it possible to
>> have multiple layers of layout going on in the application? Let's say
>> that I'm using a grid layout to neatly and symmetrically define a
>> number of controls and elements. On top of that, I wish to randomly
>> scattered some other overlayed things on top. That second layer
>> really doesn't fit into the idea of a grid layout as it is somewhat
>> irregular, what I really need is to manage the arrangement of those
>> myself, which would lend itself to an canvas.
>>
>> So given that scenario, can you give a window both a grid layout and a
>> canvas layout, and put different controls/visuals into the different
>> layers? Or perhaps the answer is using the canvas for the base
>> layout, and then nesting a full window sized grid within that canvas.
>> Any thoughts?

>
>
> A Grid supports multiple layers within the same cell, so what you would
> do is something like this:
>
> <Window>
> <Grid>
> <Grid><!-- this is the grid you talk about for structured layout
> --></Grid>
> <Canvas><!-- this is the canvas you talk about for positioned layout
> --></Canvas>
> </Grid>
> </Window>
>
> HTH,
> Drew
> ___________________________________
> Drew Marsh
> Chief Software Architect
> Mimeo.com, Inc. - http://www.mimeo.com
> Microsoft C# / WPF MVP
> Weblog - http://blog.hackedbrain.com/
>
>


Very cool, thanks Drew!
My System SpecsSystem Spec
 

Thread Tools


Similar Threads
Thread Forum
Newbie question: replace multiple strings in multiple text files VB Script
2 Layers Of Encryption? System Security
Media Center Multiple Tuner Cards Multiple satellite services Vista music pictures video
Visual Layout Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46