protected override void OnNavigatedTo(NavigationEventArgs args) { var LampGot = (LampsPage)args.Parameter; LampsPage = LampGot; Lamp = LampsPage.getLamp(LampsPage.currentNumber); if (!LampsPage.Allbutton) { LampName.Text = Lamp.Name; } else { LampName.Text = "All Lamps"; } lightToggle.IsOn = Lamp.IsOn; lightToggle.Toggled += Switch_Click; HueSlider.Value = Lamp.Hue; SatSlider.Value = Lamp.Saturation; BriSlider.Value = Lamp.Brightness; ColorRect.Fill = new SolidColorBrush(ColorUtil.HsvToRgb(HueSlider.Value, SatSlider.Value, BriSlider.Value)); }
protected override void OnNavigatedTo(NavigationEventArgs args) { var LampGot = (LampsPage)args.Parameter; lampsPage = LampGot; disco = true; Disco(); }