Reputation: 23
Array selected = Array.CreateInstance(typeof(Object), (this.designer1.DesignerHost.GetService(typeof(ISelectionService)) as ISelectionService).SelectionCount);
(this.designer1.DesignerHost.GetService(typeof(ISelectionService)) as ISelectionService).GetSelectedComponents().CopyTo(selected, 0);
_PropertyGrid.SelectedObjects = new object[] {selected};
I am trying to display multiple objects in the PropertyGrid, what am I doing wrong?
Upvotes: 0
Views: 6247
Reputation: 23
Found my answer myself :)
_PropertyGrid.SelectedObjects = (selected as object[]);
does the job ;)
Upvotes: 1