protected virtual void OnOverlayChanged(OverlayChangedOverlaySwitcherEventArgs e) { EventHandler<OverlayChangedOverlaySwitcherEventArgs> handler = OverlayChanged; if (handler != null) { handler(this, e); } }
protected virtual void OnOverlayChanged(OverlayChangedOverlaySwitcherEventArgs e) { EventHandler <OverlayChangedOverlaySwitcherEventArgs> handler = OverlayChanged; if (handler != null) { handler(this, e); } }
private void OverlaySwitcher_BaseOverlayChanged(object sender, OverlayChangedOverlaySwitcherEventArgs e) { BingMapsOverlay bingMapsOverlay = e.Overlay as BingMapsOverlay; if (bingMapsOverlay != null) { bool cancel = ApplyBingMapsKey(); e.Cancel = cancel; } }
private void ChangeBaseOverlay(OverlayItem item) { if (IsLoaded) { OverlayChangedOverlaySwitcherEventArgs overlaySwitchedEventArgs = new OverlayChangedOverlaySwitcherEventArgs(item.Overlay); OnOverlayChanged(overlaySwitchedEventArgs); if (overlaySwitchedEventArgs.Cancel) { BindingOverlays(activeOverlay); } else { activeOverlay = item.Overlay; foreach (Overlay overlay in CurrentMap.Overlays.Where(o => o.IsBase)) { overlay.IsVisible = activeOverlay == overlay; } CurrentMap.Refresh(); } } }