/// <summary> /// 绑定command删除多个会出问题 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void RemoveLayer_Click(object sender, RoutedEventArgs e) { List <LayerBase> list = new List <LayerBase>(); foreach (var item in LayerGroup.SelectedItems) { list.Add(item as LayerBase); } LayerGroup.UnselectAll(); Service.RemoveLayer(list); }