private void OnSelectionChangedAction(List <_Control> selectedList) { if (selectedList.Count == 0) { PropertyGrid.Browse(DesginControl, null); MessageTextBlock.Text = "可以选择需要添加的元素,或者鼠标选取屏幕上元素删除、移动等操作"; } else if (selectedList.Count == 1) { PropertyGrid.Browse(selectedList[0], selectedList[0].GetProperties()); MessageTextBlock.Text = string.Format("选择了一个{0}对象", selectedList[0].ToString()); } else { PropertyGrid.Browse(null, null); MessageTextBlock.Text = string.Format("选择了{0}个对象", selectedList.Count); } }