How to get IWpfTextView from command Visual Studio Extension 2017
问题 I need to show popup use TextViewAdornment, it's require IWpfTextView. There is old code to that: private IWpfTextView GetWpfTextView(IVsTextView vTextView) { IWpfTextView view = null; IVsUserData userData = vTextView as IVsUserData; if (null != userData) { IWpfTextViewHost viewHost; object holder; Guid guidViewHost = DefGuidList.guidIWpfTextViewHost; userData.GetData(ref guidViewHost, out holder); viewHost = (IWpfTextViewHost)holder; view = viewHost.TextView; } return view; } but when go to