本文整理汇总了C#中ISelectionService.GetSelectedComponents方法的典型用法代码示例。如果您正苦于以下问题:C# ISelectionService.GetSelectedComponents方法的具体用法?C# ISelectionService.GetSelectedComponents怎么用?C# ISelectionService.GetSelectedComponents使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ISelectionService
的用法示例。
在下文中一共展示了ISelectionService.GetSelectedComponents方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddSelectionGlyphs
private void AddSelectionGlyphs(SelectionManager selMgr, ISelectionService selectionService)
{
ICollection selectedComponents = selectionService.GetSelectedComponents();
GlyphCollection glyphs = new GlyphCollection();
foreach (object obj2 in selectedComponents)
{
ToolStripItem component = obj2 as ToolStripItem;
if (component != null)
{
ToolStripItemDesigner designer = (ToolStripItemDesigner) this.host.GetDesigner(component);
if (designer != null)
{
designer.GetGlyphs(ref glyphs, new ResizeBehavior(component.Site));
}
}
}
if (glyphs.Count > 0)
{
selMgr.SelectionGlyphAdorner.Glyphs.AddRange(glyphs);
}
}
示例2: UpdatePropertyPadSelection
void UpdatePropertyPadSelection(ISelectionService selectionService)
{
ICollection selection = selectionService.GetSelectedComponents();
var selArray = new object[selection.Count];
selection.CopyTo(selArray, 0);
propertyContainer.SelectedObjects = selArray;
}
示例3: UpdatePropertyPadSelection
void UpdatePropertyPadSelection(ISelectionService selectionService)
{
ICollection selection = selectionService.GetSelectedComponents();
object[] selArray = new object[selection.Count];
selection.CopyTo(selArray, 0);
propertyContainer.SelectedObjects = selArray;
//System.Windows.Input.CommandManager.InvalidateRequerySuggested();
}