簡體   English   中英

Windows 10 UWP命令欄

[英]Windows 10 UWP Command Bar

自從將Windows 10周年版與SDK一起應用以來,其中一個命令欄就具有不同的行為。 它曾經顯示三個AppButton。 現在,將僅顯示兩個。 最左側似乎有一個空按鈕。

命令列

這是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>

如何消除左側的縫隙?

我相信該更新稍微改變了命令欄的顯示機制。 為了解決這個問題,我將控件所在的網格列從固定寬度更改為自動寬度。 現在,該控件將在左側顯示所有三個按鈕而沒有任何間隙。 專欄稍微寬一點,但是我可以吸收它。

在上圖中,命令欄將第三個按鈕從顯示屏上切出。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM