private static object CoerceSelectedObject(DependencyObject d, object value) { WpfPropertyGrid pg = d as WpfPropertyGrid; object[] collection = pg.GetValue(SelectedObjectsProperty) as object[]; return(collection.Length == 0 ? null : value); }
private static object CoerceSelectedObjects(DependencyObject d, object value) { WpfPropertyGrid pg = d as WpfPropertyGrid; object single = pg.GetValue(SelectedObjectsProperty); return(single == null ? new object[0] : value); }