Skip to content

Instantly share code, notes, and snippets.

@robinmanuelthiel
Last active December 2, 2015 10:52
Show Gist options
  • Save robinmanuelthiel/1061a001e4649cd3b9fe to your computer and use it in GitHub Desktop.
Save robinmanuelthiel/1061a001e4649cd3b9fe to your computer and use it in GitHub Desktop.
protected override async void OnNavigatedTo(NavigationEventArgs e)
{
base.OnNavigatedTo(e);
if (!string.IsNullOrEmpty(e.Parameter as string))
{
// Check if all paramters for accessing the light are set
if (App.HomeMatic != null && App.SelectedLightId != 0)
{
var args = ((string)e.Parameter).Split('|');
if (args[1] == "on")
// Switch light on
else
// Switch light off
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment