A在我的Windows 8.1中有以下CommandBar (我使用的是通用模板):
<Page.BottomAppBar>
<CommandBar>
<AppBarButton Label="add task" Click="GoToAddTask">
<AppBarButton.Icon>
<SymbolIcon Symbol="Add" />
</AppBarButton.Icon>
</AppBarButton>
<AppBarButton Label="sort by">
<AppBarButton.Icon>
<SymbolIcon Symbol="Sort" />
</AppBarButton.Icon>
<AppBarButton.Flyout>
<MenuFlyout>
<MenuFlyoutItem Command="{Binding SortByDate}" Text="Date" />
<MenuFlyoutItem Text="Priority" Command="{Binding SortByPriority}" />
<MenuFlyoutItem Text="Name" Command="{Binding SortByName}" />
</MenuFlyout>
</AppBarButton.Flyout>
</AppBarButton>
<AppBarButton Label="pin project" Command="{Binding PinProject}">
<AppBarButton.Icon>
<SymbolIcon Symbol="Pin" />
</AppBarButton.Icon>
</AppBarButton>
</CommandBar>
</Page.BottomAppBar>问题是,当用户单击AppBarButton“按”排序时,飞出的底部边缘似乎被卡在AppBar本身后面的屏幕底部。这是一个截图:

我检查了Windows8.1的等价物,它工作得很好(例如,here)。
我假设在AppBar本身的上方会显示反演算。
发布于 2014-05-07 16:19:46
我相信这是一个众所周知的问题。与其将MenuFlyout放在行中,不如在click事件上创建它:
private void AppBarButton_Click(object sender, RoutedEventArgs e)
{
MenuFlyout mf = (MenuFlyout)this.Resources["MyFlyout"];
mf.Placement = FlyoutPlacementMode.Bottom;
mf.ShowAt(this.root);
}看看能不能。
https://stackoverflow.com/questions/23326717
复制相似问题