使用更多按钮在 AppBar 中显示命令标签

Show commands' labels in AppBar with More button

所以我在我的 WinJS UWP 应用程序中有一个 AppBar

<div data-win-control="WinJS.UI.AppBar" id="appBar" data-win-options="{ closedDisplayMode : 'compact', placement:'bottom'}">
    <button data-win-control="WinJS.UI.AppBarCommand"
            data-win-options="{id:'flyoutButton',
        type:'flyout',
        label:'Třída',
        icon:'otheruser',
        flyout:select('#classFlyout')}"></button>
    <button data-win-control="WinJS.UI.AppBarCommand"
            data-win-options="{id:'flyoutButton',
        type:'flyout',
        label:'Schovávání hodin',
        icon:'calendarday',
        flyout:select('#hidingFlyout')}"></button>
    <button data-win-control="WinJS.UI.AppBarCommand" data-win-options="{id:'moreButton',label:'More',icon:'more',section:'primary',tooltip:'Show more'}"></button>
</div>

它有两个弹出按钮和一个按钮。当我单击该按钮时,我希望其他命令的标签可见 - 就像在 Win10 Weather 应用程序中一样。

我尝试创建一个函数,将应用栏的 closedDisplayMode 更改为 'full'。

WinJS.UI.processAll().done(function () {
    appBar = document.getElementById("appBar");
});

function addListeners() {
    document.getElementById("moreButton").addEventListener("click", openCloseAppbar, false);
}

function openCloseAppbar() {
    appBar.closedDisplayMode = 'full';
}

然而,那是行不通的。有没有其他方法通常是我错过的? (因为出于某种原因我找不到任何关于它的文档。)或者我只是做错了..?

正确的做法显然是这样的:

appBar.winControl.closedDisplayMode = "full";

(强调.winControl。)