![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | 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 |
| | #2 (permalink) |
| Guest | 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. |
| | #3 (permalink) |
| Guest | Re: How to proportional space all the children inside a list ? Kevin Hoffman wrote: > 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. > I wanted a solution which didn't required me to hard code the number of items I will put inside it. The number of items is unknown at design time. Thanks Phil |
| |
| |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Reading newsgroup messages coded with plain/text are shown with proportional font | Erhard Glueck | Live Mail | 0 | 01-10-2008 02:28 AM |
| change permission on all files inside a folder or hundreds of file inside a folder | Anthony B | Vista security | 2 | 12-28-2007 04:26 AM |
| Can not remove one of my contact inside contact list | khoosl | Vista mail | 12 | 06-16-2007 08:23 AM |
| Children of the Nile | seasider | Vista Games | 0 | 03-18-2007 02:34 PM |
| Those thieving children | MICHAEL | Vista General | 2 | 12-31-2006 12:58 PM |