Windows Dev Center

SystemTray.SetBackgroundColor Method

Sets the value of the BackgroundColor attached property for a specified phone application page.

Namespace:  Microsoft.Phone.Shell
Assembly:  Microsoft.Phone (in Microsoft.Phone.dll)

'Declaration
Public Shared Sub SetBackgroundColor ( _
	element As DependencyObject, _
	color As Color _
)

Parameters

element
Type: System.Windows.DependencyObject
The page for which to set the BackgroundColor attached property.
color
Type: System.Windows.Media.Color
The background color to set for the system tray.

The system tray is also referred to as the status bar.

The following code example shows how to use the SystemTray class in conjunction with the ProgressIndicator class.

Imports Microsoft.Phone.Shell

Partial Public Class MainPage
    Inherits PhoneApplicationPage

    Dim prog As ProgressIndicator
    
    Public Sub New()
        InitializeComponent()

        SystemTray.SetIsVisible(Me, true)
        SystemTray.SetOpacity(Me, 0.5)
        SystemTray.SetBackgroundColor(Me, Colors.Blue)
        SystemTray.SetForegroundColor(Me, Colors.Yellow)

        prog = new ProgressIndicator()
        prog.IsVisible = true
        prog.IsIndeterminate = true
        prog.Text = "Click me..."

        SystemTray.SetProgressIndicator(Me, prog)
    End Sub
End Class

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Windows Phone

Show:
© 2015 Microsoft