Silverlight: stretching to remaining space in StackPanel

前端 未结 4 864
无人及你
无人及你 2021-02-01 14:07

I have a vertical StackPanel with two elements: a Button and a ListBox. How can I have the ListBox stretch to the remaining page height?



        
4条回答
  •  被撕碎了的回忆
    2021-02-01 14:44

    You can use a DockPanel. Set the first item to dock top and the second to dock fill, or use the LastChildFill property:

        
        

提交回复
热议问题