问题
I'm developing a VS 2010 Extension, and I would like to know if there is a way to open a Work Item in the Team Explorer Work Item Editor ?
What code should I call to accomplish this? I'm clueless.
回答1:
There is a extension,TEK Workitem, in Visual Studio Gallery, that allows to open workitems and queries in Visual Studio from a hyperlink. You find more details on the Gallery:
TFS Extensions Kit. Workitem
回答2:
I am not 100% sure what you are asking for because I don't know what the "Team Explorer Work Item Editor" is. Maybe you simply mean the UI to edit a WI?
If you want to edit a WI in code via the TFS API you do:
Open Work Item in Team Web Access from C# Code
Another great read for anyone starting out that wants examples of how to work with the API is:
Team Foundation Server 2010 API Interface
回答3:
That editor is part of the TFS power tools. I don't know if you can create that tool window and then show you UI in.
Another approach could be to just open the wit in visual studio, which then automatically opens the default editor for the file.
来源:https://stackoverflow.com/questions/6864696/how-to-open-a-tfs-work-item-inside-visual-studio-2010-inside-a-extension