【发布时间】:2016-05-01 20:55:32
【问题描述】:
如何将下方的设置按钮与窗口底部对齐? VerticalAlignment="Bottom" 没有让设置按钮出现在窗口底部。我正在使用 Visual Studio 2015 Update 2,项目模板是 BlankApp(Universal Windows)。
我的xml:
<SplitView x:Name="MySplitView" DisplayMode="CompactOverlay" IsPaneOpen="False"
CompactPaneLength="60" OpenPaneLength="250">
<SplitView.Pane>
<StackPanel BorderBrush="#FF2B2B2B" Background="{ThemeResource SystemControlHighlightListAccentHighBrush}" RequestedTheme="Dark" BorderThickness="0">
<Button x:Name="HamburgerButton" FontFamily="Segoe MDL2 Assets" Content=""
Width="60" Height="60" Background="Transparent" Click="HamburgerButton_Click"/>
<StackPanel Orientation="Horizontal">
<Button x:Name="MenuButton1" FontFamily="Segoe MDL2 Assets" Content=""
Width="60" Height="60" Background="Transparent" Click="MenuButton1_Click"/>
<TextBlock Text="Pobierz dane wiosek" FontSize="18" VerticalAlignment="Center" />
</StackPanel>
<!-- ... -->
<!-- here is problem -->
<StackPanel VerticalAlignment="Bottom" Orientation="Horizontal">
<Button x:Name="MenuButtonSettegins" FontFamily="Segoe MDL2 Assets" Content=""
Width="60" Height="60" Background="Transparent" Click="MenuButtonSettegins_Click"/>
<TextBlock Text="Ustawienia" FontSize="18" VerticalAlignment="Center" />
</StackPanel>
<!-- here is problem -->
<Grid Height="100"/>
</StackPanel>
</SplitView.Pane>
<SplitView.Content>
<Grid Margin="10,0,-10,0">
<Grid.RowDefinitions>
<RowDefinition Height="17*"/>
<RowDefinition Height="19*"/>
</Grid.RowDefinitions>
<WebView x:Name="browser" Margin="-10,0,10,0" Grid.RowSpan="2" LoadCompleted="browser_LoadCompleted" Loaded="browser_Loading" NavigationStarting="browser_NavigationStarting">
</WebView>
</Grid>
</SplitView.Content>
实际与期望的行为:
【问题讨论】:
标签: c# xaml user-interface win-universal-app windows-10-universal