public void ChangeLayerOpacity(double opacity) { if (!MapLayers.Any(x => x.IsVisible)) { return; } MapLayers.Where(x => x.IsVisible)?.ForEach(x => x.Layer.Opacity = opacity); }