Wpf DockPanel issue?

I believe the issue is your LastChildFill on the DockPanel iteself. As explained by MSDN LastChildFill makes it so that your StackPanel takes the remaining space in the DockPanel, even though you have set it to dock at the bottom. Try removing the attribute and seeing if that helps Edit: Removing the attribute alone does not do it.

I got the expected behavior by swapping the ListView and StackPanel, but that changes the tab order (although here it is only between two items so setting the focus to the ListView makes it look right) Alternately, can you use a grid with two rows--the ListView in the first row with a height of "*" and the StackPanel in the second with a height of "Auto"? Or is this a simplification of a more complex layout where that would not work?

I believe the issue is your LastChildFill on the DockPanel iteself. As explained by MSDN, LastChildFill makes it so that your StackPanel takes the remaining space in the DockPanel, even though you have set it to dock at the bottom. Try removing the attribute and seeing if that helps.

Edit: Removing the attribute alone does not do it. I got the expected behavior by swapping the ListView and StackPanel, but that changes the tab order (although here it is only between two items so setting the focus to the ListView makes it look right). Alternately, can you use a grid with two rows--the ListView in the first row with a height of "*" and the StackPanel in the second with a height of "Auto"?

Or is this a simplification of a more complex layout where that would not work?

Probably I will try solution with grid. – Alex 2 days ago.

As @DocMax said the last child fill would work ONLY if there is some space available in the dockpanel after all previous children are occupied. For ListView having large number of rows, the space is already taken up by it so stackpanel is left with no space to occupy. I suggst you supply some MinHeight to the stackpanel.

No, MinHeight does not help. – Alex 2 days ago.

I believe the issue is your LastChildFill on the DockPanel iteself. As explained by MSDN, LastChildFill makes it so that your StackPanel takes the remaining space in the DockPanel, even though you have set it to dock at the bottom. Try removing the attribute and seeing if that helps.

Edit: Removing the attribute alone does not do it.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions