C# Class HueApp.MainPage

The main page for the Hue app controls.
Inheritance: Windows.UI.Xaml.Controls.Page, INotifyPropertyChanged
Show file Open project: Microsoft/Windows-appsample-huelightcontroller

Private Properties

Property Type Description
BluetoothWatcher_Click void
DisableWatcher void
EnableWatcherAsync System.Threading.Tasks.Task
LightRefresh_Click void

Public Methods

Method Description
MainPage ( ) : HueLibrary

Constructor for MainPage.

Protected Methods

Method Description
OnNavigatedTo ( NavigationEventArgs e ) : void

Fires when the page is navigated to, which occurs after the extended splash screen has finished loading all Hue resources.

Private Methods

Method Description
BluetoothWatcher_Click ( object sender, RoutedEventArgs e ) : void

Fires when the Bluetooth watcher app bar toggle button is clicked.

DisableWatcher ( ) : void

Disables the background watcher.

EnableWatcherAsync ( ) : System.Threading.Tasks.Task

Registers the Bluetooth LE watcher background task, assuming Bluetooth is available.

LightRefresh_Click ( object sender, RoutedEventArgs e ) : void

Refreshes the UI to match the actual state of the lights.

Method Details

MainPage() public method

Constructor for MainPage.
public MainPage ( ) : HueLibrary
return HueLibrary

OnNavigatedTo() protected method

Fires when the page is navigated to, which occurs after the extended splash screen has finished loading all Hue resources.
protected OnNavigatedTo ( NavigationEventArgs e ) : void
e Windows.UI.Xaml.Navigation.NavigationEventArgs
return void