简体   繁体   English

Windows 10 UWP命令栏

[英]Windows 10 UWP Command Bar

Since applying the Windows 10 Anniversary Edition along with the SDK, one of the Command Bars has different behavior. 自从将Windows 10周年版与SDK一起应用以来,其中一个命令栏就具有不同的行为。 It used to display three AppButtons. 它曾经显示三个AppButton。 Now, only two will display. 现在,将仅显示两个。 There appears to be an empty button on the far left. 最左侧似乎有一个空按钮。

命令列

Here is the XAML: 这是XAML:

<CommandBar x:Name="VideoGroupCommands"
            RelativePanel.AlignBottomWithPanel="True"
            RelativePanel.AlignLeftWithPanel="True"
            RelativePanel.AlignRightWithPanel="True"
            Background="{StaticResource LightBeigeBrush}"
            IsEnabled="{x:Bind ViewModel.IsVideoGroupSelected,Mode=TwoWay}">
    <AppBarButton Icon="Edit"
                  x:Uid="Edit"
                  Label=""
                  Command="{x:Bind ViewModel.EditVideoGroupCommand}"/>
    <AppBarButton Icon="Delete"
                  x:Uid="Delete"
                  Label=""
                  Command="{x:Bind ViewModel.DeleteGroupCommand}"/>
    <AppBarButton Icon="MoveToFolder" x:Uid="Merge" Label=""/>
</CommandBar>

How do I eliminate the gap on the left? 如何消除左侧的缝隙?

I believe the update changed the display mechanics, slightly, for the command bar. 我相信该更新稍微改变了命令栏的显示机制。 To fix this, I changed the grid column the control is in from a FIXED width to an AUTO width. 为了解决这个问题,我将控件所在的网格列从固定宽度更改为自动宽度。 Now, the control displays all three buttons with no gap on the left. 现在,该控件将在左侧显示所有三个按钮而没有任何间隙。 The column is a little wider, but I can absorb it. 专栏稍微宽一点,但是我可以吸收它。

In the picture above, the command bar was cutting the third button out of the display. 在上图中,命令栏将第三个按钮从显示屏上切出。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM