I'm creating a program using WPF that has an FTP like interface with 2 list views and 2 buttons between them. The problem I have is that I don't know how to set the 2 list views to fill up the available space without getting the buttons to do so as well.
A:
Unless I'm misunderstanding your question all you need to do is hard code the button widths I think?
Spencer Ruport
2009-05-06 01:40:36
A:
Since you are using WPF, your interface is in XAML. Why not just edit your XAML in Expression Blend and use the mouse to move and size everything the way you want it to look.
JonnyBoats
2009-05-06 01:52:00
+1
A:
You can use a Grid to do that:
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<ListBox
x:Name="list1"
Grid.Column="0"
/>
<StackPanel
x:Name="buttonsPlaceholder"
Grid.Column="1"
/>
<ListBox
x:Name="list2"
Grid.Column="2"
/>
</Grid>
Also, i believe using absolute sizing is a really bad practice, because WPF has so many features for auto-sizing.
arconaut
2009-05-06 07:51:58
I'd give you +2 if I could, 1 for the good example and another for reminding people not to use fixed heights/widths.
Bryan Anderson
2009-05-06 14:34:27