Change SystemTray.IsVisible during runtime (code)? Windows Phone 7 Related
Can 开发者_运维技巧I disable SystemTray.IsVisible during runtime so my consumers can hide the systemtray or show it when they want to?
Try it and see instead of asking? It takes longer to write the question, than to write the code for it.
But I would recommend against it. The SystemTray automatically hides itself (but keep it's allocated 12 pixels), and only show when you tap at the top.
Changing it's Opacity, and adjusting the Background to match that of your app, it's a much better idea.
Yes, you can. Try this anywhere ... Note too that this also applies to WP8
PhoneApplicationFrame frame = Application.Current.RootVisual as PhoneApplicationFrame;
if (frame != null)
{
PhoneApplicationPage page = frame.Content as PhoneApplicationPage;
if (page != null)
{
SystemTray.SetIsVisible(page, false);
}
}
精彩评论