开发者

Display multiple objects in property grid

Array selected = Array.CreateInstance(typeof(Object), (this.designer1.DesignerHost.GetService(typeof(ISelectionService)) as ISelectionService).SelectionCount);
(this.designer1.DesignerHost.GetService(typeof(ISelectionService)) as ISelectionService).GetSel开发者_StackOverflowectedComponents().CopyTo(selected, 0);
_PropertyGrid.SelectedObjects = new object[] {selected};

I am trying to display multiple objects in the PropertyGrid, what am I doing wrong?


Found my answer myself :)

_PropertyGrid.SelectedObjects = (selected as object[]);

does the job ;)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜