嗨,我试图在屏幕底部有两个浮动按钮。现在我实现以下代码:
<ScrollViewer>
<RelativePanel>
// Main Content here
<StackPanel RelativePanel.AlignBottomWithPanel="True" >Two buttons appears at the bottom of the PAGE (not screen)</StackPanel>
</RelativePanel>
</ScrollViewer>
正如您所料,按钮显示在页面底部。我希望按钮出现在屏幕的底部。
XAML中是否有任何可用于实现的面板:
====================
Scrollable area
=====================
Button1 Button2
----------------------
答案 0 :(得分:0)
你可以试试这个,
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="50"/>
</Grid.RowDefinitions>
<ScrollViewer Grid.Row="0">
</ScrollViewer>
<StackPanel Grid.Row="1" Orientation="Horizontal">
<Button/>
<Button/>
</StackPanel> </Grid>
希望这会对你有所帮助。如果有帮助,请将其标记为答案。