private void Button_Click(object sender, RoutedEventArgs e) { Button myButton = (Button)sender; HueGroup hl = myButton.DataContext as HueGroup; this.Frame.Navigate(typeof(SettingsGroup), hl); }
protected override void OnNavigatedTo(NavigationEventArgs e) { huegroup = (HueGroup)e.Parameter; NameLight.Text = huegroup.name; int r, g, b; huegroup.getRGBValue(out r, out g, out b); Red.Value = r; Green.Value = g; Blue.Value = b; SetOn.IsOn = huegroup.OnLamp; SolidColorBrush color = new SolidColorBrush(huegroup.getColor()); ColorChanger.Fill = color; }