C# UWP命令栏至右侧

C# UWP命令栏至右侧,c#,xaml,uwp,commandbar,C#,Xaml,Uwp,Commandbar,我想把命令栏移到右边,让AppBarButtons从上到下流动。换句话说,我想将命令栏从页面的顶部向右侧旋转90度 我怎样才能做到这一点 J.命令栏没有垂直方向模式,因此无法执行此操作。您可以使用以下工具将其旋转90度 <CommandBar.RenderTransform> <RotateTransform CenterX="0" CenterY="0" Angle="90" /> </CommandBar.RenderTransform> 但是按

我想把命令栏移到右边,让AppBarButtons从上到下流动。换句话说,我想将命令栏从页面的顶部向右侧旋转90度

我怎样才能做到这一点


J.

命令栏没有垂直方向模式,因此无法执行此操作。您可以使用以下工具将其旋转90度

<CommandBar.RenderTransform>
    <RotateTransform CenterX="0" CenterY="0" Angle="90" />
</CommandBar.RenderTransform>

但是按钮也会旋转。你应该考虑一个不同的控件,比如SPLITVIEW。

命令条没有垂直方向模式,所以你不能这样做。您可以使用以下工具将其旋转90度

<CommandBar.RenderTransform>
    <RotateTransform CenterX="0" CenterY="0" Angle="90" />
</CommandBar.RenderTransform>

但是按钮也会旋转。你应该考虑一个不同的控件,比如SPLITVIEW。

你不能这么做,因为CommandBar默认是建立在水平模式的,包括扩展动画、弹出行为等等。通过更大的努力,您可以修改默认模板以支持此操作。此外,您可以在任何地方使用AppBarButton控件,而不仅仅是在CommandBar中。我的建议是使用以下内容:

<StackPanel Orientation="Vertical">
   <AppBarButton ... />
   <AppBarButton ... />
   <AppBarButton ... />
<StackPanel>

您可以使用AppBarButton的LabelPosition属性设置为Collapsed来隐藏标签,以获得更清晰的体验。

您无法轻松做到这一点,因为CommandBar默认为水平模式构建,包括展开动画、弹出行为等。。通过更大的努力,您可以修改默认模板以支持此操作。此外,您可以在任何地方使用AppBarButton控件,而不仅仅是在CommandBar中。我的建议是使用以下内容:

<StackPanel Orientation="Vertical">
   <AppBarButton ... />
   <AppBarButton ... />
   <AppBarButton ... />
<StackPanel>

您可以使用AppBarButton的LabelPosition属性设置为Collapsed来隐藏标签,以获得更干净的体验。

但是如何将StackPanel调整为AppBarButton的大小?StackPanel太大,看起来不太好问题不在StackPanel中,而是在AppBarButtons的默认填充中。您必须修改AppBarButton模板才能删除该填充。但是如何将StackPanel调整为AppBarButton的大小?StackPanel太大,看起来不太好问题不在StackPanel中,而是在AppBarButtons的默认填充中。您必须修改AppBarButton模板才能删除该填充。