Created
August 28, 2014 11:25
-
-
Save IrisClasson/cfbb24bc10ded4d8bcc3 to your computer and use it in GitHub Desktop.
Windows phone StatusBar/SystemTray code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<phone:PhoneApplicationPage x:Class="Temp2SL.MainPage" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone" | |
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone" | |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
mc:Ignorable="d" | |
SupportedOrientations="Portrait" | |
Orientation="Portrait" | |
shell:SystemTray.BackgroundColor="PapayaWhip" | |
shell:SystemTray.ForegroundColor="DarkGreen" | |
shell:SystemTray.Opacity="0.7" | |
shell:SystemTray.IsVisible="True"> | |
<shell:SystemTray.ProgressIndicator> | |
<shell:ProgressIndicator | |
Text="Waiting" | |
IsIndeterminate="True" | |
IsVisible="True" /> | |
</shell:SystemTray.ProgressIndicator> | |
<Grid Background="SaddleBrown" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ApplicationView.GetForCurrentView() | |
.SetDesiredBoundsMode(ApplicationViewBoundsMode.UseCoreWindow); | |
ApplicationView.GetForCurrentView() | |
.SetDesiredBoundsMode(ApplicationViewBoundsMode.UseVisible); | |
var sb = StatusBar.GetForCurrentView(); | |
sb.BackgroundColor = Colors.Yellow; | |
sb.ForegroundColor = Colors.Brown; | |
sb.BackgroundOpacity = 0.4; | |
sb.Hiding += (sender, args) => { /* On hide event */}; | |
sb.Showing += (sender2, args2) => { /* On show event */}; | |
sb.ProgressIndicator.Text = "Waiting"; | |
sb.ProgressIndicator.ShowAsync(); | |
sb.Hiding += (sender, args) => { /* On hide event */}; | |
sb.Showing += (sender2, args2) => { /* On show event */}; | |
await sb.HideAsync(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment