c# - Windows Phone 8.1 命令栏

标签 c# xaml windows-phone-8.1 commandbar

现在我正在使用 VS2015、C# 和 XAML 制作 Windows Phone 8.1 应用程序。 并想了解 Commandbar。

我只使用二级命令栏。所以,我想压缩主要的空间,当 Commandbar 弹出时。但我无法解决这个问题。

Ideal Image, commandbar's height short

现在我的代码在这里。

<Page.BottomAppBar>
    <CommandBar ClosedDisplayMode="Minimal" Background="Tomato">
        <CommandBar.SecondaryCommands>
            <AppBarButton x:Name="appBarAboutButton" 
                          Label="about"
                          Click="appBarAboutButton_Click"/>
        </CommandBar.SecondaryCommands >
    </CommandBar>
</Page.BottomAppBar>

请告诉我如何解决这个问题。

最佳答案

目前这是命令栏的预期行为,没有解决方法。但是命令栏中有一个名为 Content 的属性。您可以尝试一下,看看它是否符合您的需要。

CommandBar has 3 properties you can use to add content and commands: Content, PrimaryCommands, and SecondaryCommands. You can add any XAML elements to the content area by setting the Content property.

查看此链接了解更多信息 https://msdn.microsoft.com/en-in/library/windows/apps/windows.ui.xaml.controls.commandbar.aspx

关于c# - Windows Phone 8.1 命令栏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34785108/

相关文章:

c# - 是否可以以编程方式设置启动背景?

windows-phone-8.1 - 如何在 Windows Phone 8.1 中查找 Wi-Fi 连接的信号强度?

c# - 如何正确使用 NetMq Poller 接收数据

c# - Process.Start() 是同步的吗?

c# - 动态绑定(bind)到 DataTemplate

c# - 类库中的可移植 XAML 样式

visual-studio-2013 - 是否可以在通用应用程序中使用具有本地化资源的可移植库?

c# - C# 中 oracle 连接的最佳实践

c# - 我如何查看是否有任何程序正在模拟 key

c# - XAML 绑定(bind)未更新