Beautiful! I changed the main container to a Grid as you suggested and got the desired result.
This is so cool. There are so many ways to present data with WPF. It will take a long time to learn all the tricks. However, I see spending a lot more time playing with the UI possibilities than with VFP. In VFP your UI choices are quite fixed, so there's not a whole lot of thinking to go into the UI design. Everybody knows what a LOB UI is going to look like. With WPF ( i.e. the LisView control alone) , the possibilities are endless.
I wish I could show a screen shot.
>Grid would be your other choice here: (Note the row height definitions Auto and *)
>
>
> <Grid>
> <Grid.RowDefinitions>
> <RowDefinition Height="Auto"></RowDefinition>
> <RowDefinition Height="*"></RowDefinition>
> </Grid.RowDefinitions>
> <StackPanel Orientation="Horizontal" Grid.Row="0">
> <TextBox x:Name="txtCustomerFilter" Width="100" Margin="5"></TextBox>
> <Button x:Name="ButtonSearch" Width="50" Margin="5" >Search</Button>
> </StackPanel>
> <ListView Name="lv2" HorizontalContentAlignment="Stretch"
> ScrollViewer.VerticalScrollBarVisibility="Visible"
> Grid.Row="1">
>
>