2015-10-05 74 views
0

我需要我的ToggleMenuFlyout占据整个屏幕(在我的手机上),但我无法。Menu Flyout XAML - C# - Windows 10 Mobile

有人可以帮助我吗?

我的代码:

AppBarButton x: Name = "FiltersPhone" Icon = "Filter" label = "Names"> 
                 <AppBarButton.Flyout> 
                      <MenuFlyout> 
                     <MenuFlyout.MenuFlyoutPresenterStyle> 
                         <Style TargetType = "MenuFlyoutPresenter"> 
                             <Setter Property = "Background" Value = "Transparent" /> 
                             <Setter Property = "BorderThickness" Value = "0" /> 
                             <Setter Property = "Margin" Value = "0,4,0,0" /> 
                         </ Style> 
                     </MenuFlyout.MenuFlyoutPresenterStyle> 
                     <ToggleMenuFlyoutItem x: Name = "FlyoutItemDate" Text = "Today" tag = "Date" 
                                            IsChecked = "True /> 

                 </ MenuFlyout> 
                 </AppBarButton.Flyout> 
             </ AppBarButton> 

感谢

+0

似乎与http://stackoverflow.com/questions/32948697/tooglemenuflyout-and-menuflyoutpresenterstyle-set-width-windows-10-mobile/32961410#32961410重复。你想要全屏或全屏吗?如果是全宽,请在这个问题上查看我的答案。如果它是全屏,请采用@ Stanley1的建议。 –

+0

我需要切换菜单飞出占据屏幕全宽 – fipcurren88

+0

然后检查我的答案在你的另一个问题。我添加了一个截图供您参考。 –

回答

0
  <AppBarButton> 
      <AppBarButton.Flyout > 
       <MenuFlyout Placement="Full"></MenuFlyout> 
      </AppBarButton.Flyout> 
      </AppBarButton> 

祝您好运!

+0

嗨,问题是一样的。切换菜单弹出不占用整个屏幕的宽度。 当我把这个,左右边缘有一个小的边距,并且弹出是中心。 :( – fipcurren88

+0

这就是弹出如何工作..也许你应该实现一个弹出,而不是 –

+0

奇怪的是,在肖像模式是完美的,但景观是错误的! – fipcurren88

相关问题