Reputation: 13
I'm trying to replicate the behaviour that you can see on the new bing apps on Windows Phone 8. It shows the title of the app on top of the screen, when you tap that area the title slides offscreen and the status-icons slide-in. I managed to get my titlebar up there and can slide the text off on a tap event. Problem is I only get the tap event if SystemTray.IsVisible is set to false. If I set the visibility to true inside my tap event it doesnt force the icons to show so it needs another tap to show the icons. Does anyone know if I can catch the SystemTray Tap Event or if I can force the icons to show or maybe simulate a touch input?
Upvotes: 1
Views: 1062
Reputation: 39007
It's way easier than you think. Just subscribe to the Loaded
event of your page, and put a progress indicator in the system tray, displaying the text you want:
private void PhoneApplicationPage_Loaded(object sender, RoutedEventArgs e)
{
var progressIndicator = new ProgressIndicator { Text = "Your title", IsVisible = true };
SystemTray.SetProgressIndicator(this, progressIndicator);
}
Note that you can also change the colors by using SystemTray.BackgroundColor
and SystemTray.ForegroundColor
Upvotes: 2