void Layer_PropertyChanged(object sender, PropertyChangedEventArgs e) { if (e.PropertyName == "ShowLegend") UpdateMapLayerItems(); }