Answer by Dave Hanson for Remove additional vertical whitespace from WPF
You need to make the container that contains the ListBox to have a height of AUTOListBox1 is in a row of height AUTOListBox2 is in a row span of height *This'll allow you to have the correct height on...
View ArticleAnswer by Salvatore Previti for Remove additional vertical whitespace from WPF
Perhaps...<StackPanel LastChildFill="False">
View ArticleAnswer by Mohammad Zare for Remove additional vertical whitespace from WPF
If i understand your question correctly, you can use Height="Auto" for your listbox (or other controls) and if you want to keep your window's height updated according to the listbox, you can bind your...
View ArticleAnswer by Paul Walls for Remove additional vertical whitespace from WPF
The reason this is happening is because ListBox overrides the default ItemsPanelTemplate settings to use a VirtualizingStackPanel. It does this because VirtualizingStackPanel supports UI...
View ArticleAnswer by Joe White for Remove additional vertical whitespace from WPF
By default, controls will expand to fill all the space its container will give it. That's what you're seeing, and it's expected, since you didn't tell it to do anything else (i.e., you didn't set any...
View ArticleAnswer by Rachel for Remove additional vertical whitespace from WPF
Wrap your ListBox in a Grid and set it's VerticalAlignment="Top"It sounds like your ListBox control is inside another element such as a Grid or DockPanel, which by default stretches it's children to...
View ArticleRemove additional vertical whitespace from WPF
<Border CornerRadius="2,2,2,2" BorderThickness="1" BorderBrush="LightSkyBlue" Margin="5,2,2,2" x:Name="PersonBorder" Visibility="Collapsed"><StackPanel Orientation="Vertical"><ListBox...
View Article