【问题标题】:system tray in xaml windows phone 8xaml windows phone 8中的系统托盘
【发布时间】:2023-03-19 18:51:01
【问题描述】:

我怎样才能隐藏这个图标,

?

问题是我总是有相同的颜色背景,即使主题是黑色或浅色并且看起来不太好,我知道可以隐藏它。在 xaml 但我不知道最好的方法!

我试过这个!但不工作:(

<Page 
x:Class="App1.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:PuzzleTalk"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
Shell:SystemTray.IsVisiable="False" 
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">

【问题讨论】:

  • 您正在将 Silverlight 解决方案应用于非 Silverlight 项目。

标签: xaml windows-phone-8 microsoft-metro


【解决方案1】:

您的代码中有一个错字 - 您有 Shell:SystemTray.IsVisiable="False" 尝试使用 Shell:SystemTray.IsVisible="False"...

【讨论】:

  • 我更新了我的问题,根据你的建议:(还是同样的问题
【解决方案2】:

根据您的 XAML 标记,您正在尝试使用 Windows Phone 8.1 runtime 执行此操作

&lt;Page&gt; 是死者的礼物。

shell:SystemTray.IsVisible="True" 仅适用于Windows Phone 8 SilverlightWindows Phone 8.1 Silverlight


隐藏状态栏的代码

StatusBar statusBar = Windows.UI.ViewManagement.StatusBar.GetForCurrentView();

// Hide the status bar
await statusBar.HideAsync();

//Show the status bar
await statusBar.ShowAsync();

取自Hide Status bar in Windows Phone 8.1 Universal Apps

【讨论】:

  • 所以我无法使用 windows phone 工具包控件?如果我不使用 windows phone8.1 sliverlight?
  • 目前我不太确定,我需要选择哪个项目,我是一个非常了解windows phone 8控制的人!
  • @patel Windows Phone Toolkit 仅在 Silverlight 8.0/8.1 atm 中受支持:stackoverflow.com/questions/23308632/…
  • @patel 如果您想要有关如何创建 WP Silverlight 应用程序的屏幕截图:stackoverflow.com/questions/25090201/…
  • 如果您更熟悉经典的 Windows Phone 开发,例如 7 和 8,那么您将最熟悉 Windows Phone 8.1 Silverlight 应用程序。如果您刚开始,或展望未来,最好从“通用”应用程序开始,即 Windows Phone 8.1 运行时 - 这将使您的应用程序更容易转换为 Windows 8 商店,Windows 10 可能会采用这种方式方向更远。
猜你喜欢
  • 1970-01-01
  • 2017-08-26
  • 1970-01-01
  • 2011-12-25
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-08-22
  • 1970-01-01
相关资源
最近更新 更多