gpt4 book ai didi

c# - Windows Phone 7 隐藏应用程序栏

转载 作者:可可西里 更新时间:2023-11-01 08:33:44 28 4
gpt4 key购买 nike

我希望能够按一个按钮来禁用我的应用程序中的菜单栏。如果你去

menubar.IsVisible = false;

它抛出空引用异常。菜单栏在 XAML 中声明。

有人知道是否可以像这样动态隐藏它吗?

最佳答案

您可以将其作为 ApplicationBar 上的静态成员进行访问。即

ApplicationBar.IsVisible = true/false;

这里有一些关于为什么 ApplicationBar 不像普通 silverlight 元素那样播放的背景。

Why are the ApplicationBar objects not FrameworkElements? - Peter Torr's Blog

关于c# - Windows Phone 7 隐藏应用程序栏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4116311/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com