开发者

Get instance of IMonitorSelectionService for Visual Studio Sequence Diagram

I'm trying to create a Visual Studio extension that works alongside the Sequence Diagram Designer, and I'd like to be able to register for an event that will notify me whenever the selection changes on the diagram. The IMonitorSelectionService interface appears to offer such an event, but I don't know how to get an instance of this service from a VSPackage.

What do I need to do in order to get an instance of this service, or is there some other more easily accessib开发者_C百科le event that I could use instead?


You should be able to do the following:

IMonitorSelectionService monitorSelectionService = ((IServiceProvider)store).GetService(typeof(IMonitorSelectionService)) as IMonitorSelectionService;

Where store is the Store of the diagram you're interested in.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜