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 - How to proportional space all the children inside a list ?

 
 
Old 03-08-2006   #1 (permalink)
Philippe Lavoie


 
 

How to proportional space all the children inside a list ?

Hi,

I'm using the Jan CTP and I'd like to evenly space the elements of a
list inside an horizontal box. I do something like


<Style x:Key="TaskList" TargetType="{x:Type ItemsControl}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ItemsControl}">
<Grid Height="35">
<DockPanel Width="Auto" IsItemsHost="True"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>

My problem is that the items always have a constant width. I want them
to fill the Grid.

I also tried to use a DockPanel, but it seems the DocPanel.Dock="Fill"
property is not valid anymore.

Please help

Many thanks

Phil

My System SpecsSystem Spec
Old 03-09-2006   #2 (permalink)
Kevin Hoffman


 
 

Re: How to proportional space all the children inside a list ?

If you make a Grid's ColumnDefinition have a Width of "*" that will
have that column expand to fill the available space. I haven't tried in
the Feb CTP, but I know in the last one I used, if you have 3 columns
with a Width of *, each column will consume 33% of the available space
provided by the Grid.

That might be what you're looking for.

My System SpecsSystem Spec
Old 03-18-2006   #3 (permalink)
Nick Howell


 
 

Re: How to proportional space all the children inside a list ?

Have you tried using a style?
My System SpecsSystem Spec
 

Thread Tools


Similar Threads
Thread Forum
Reading newsgroup messages coded with plain/text are shown with proportional font Live Mail
change permission on all files inside a folder or hundreds of file inside a folder Vista security
Can not remove one of my contact inside contact list Vista mail
Children of the Nile Vista Games
Those thieving children 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