private async void ApllyAll_OnClick(object sender, RoutedEventArgs e) { List <Light> lightsfiltered = new List <Light>(lights); lightsfiltered.RemoveAll((Light light) => !light.selected); var picker = new ColorChangeDialog(new object[] { lightsfiltered, connector }); await picker.ShowAsync(); }
private async void UIElement_OnTapped(object sender, TappedRoutedEventArgs e) { Light light = (Light)(((Grid)sender).DataContext); if (select) { light.selected = !light.selected; if (light.selected) { ((Grid)sender).BorderBrush = new SolidColorBrush(Colors.DarkBlue); ((Grid)sender).BorderThickness = new Thickness(5, 5, 5, 5); } else { ((Grid)sender).BorderThickness = new Thickness(2, 2, 2, 2); ((Grid)sender).BorderBrush = new SolidColorBrush(Colors.Black); } } else { var picker = new ColorChangeDialog(new object[] { light, connector }); picker.ShowAsync(); } }
private async void Changeevery(object sender, RoutedEventArgs e) { var picker = new ColorChangeDialog(new object[] { new List <Light>(lights), connector }); picker.ShowAsync(); }