title: Can I create a Visual Studio 2010 Add-In that Uses a WPF Display?
body: <p>We're working on creating a specialized graphical editor for our enterprise applications. We've looked at and rejected DSLs. Ideally I'd like to have the main interface of the editor be docked like the code windows and use WPF for drawing. Can anyone point me to some documentation to get me on the right path?</p>
  
  <p>Thanks.</p>
  
  <p>Colin.</p>
  
  <p>UPDATE: It's beginning to look like "no." From <a href="http://msdn.microsoft.com/en-us/library/bb166228.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/bb166228.aspx</a>: "Document windows are created by implementing an editor. The IVsEditorFactory interface creates document windows as part of instantiating an editor. For more information, see Accessing the Editor By Using Legacy Interfaces."</p>
  
  <p>Following the link to <a href="http://msdn.microsoft.com/en-us/library/dd885127.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/dd885127.aspx</a> gives this this bit of advice: "You can access the Visual Studio editor from legacy interfaces. The Visual Studio SDK includes adapters known as shims, which enable these interfaces to interact with the new editor. Nevertheless, we recommend that you update your legacy code to use the new editor API. Your code will perform better and you can use new technologies such as the Windows Presentation Foundation (WPF) and the Managed Extensibility Framework (MEF)."</p>
  
  <p>So, to sum up: if you want to implement an editor you have to use the legacy interfaces, but you shouldn't use the legacy interfaces because then you can't use WPF or MEF.</p>
  
  <p>Seriously Microsoft, WTF?</p>
  
  <p>UPDATE 2: Now that I have the proper names ("custom editor"), I was able to find the following topic: <a href="http://social.msdn.microsoft.com/Forums/en-US/vsxprerelease/thread/9e605d0f-1296-47c9-a534-e54905251ebe" rel="nofollow">http://social.msdn.microsoft.com/Forums/en-US/vsxprerelease/thread/9e605d0f-1296-47c9-a534-e54905251ebe</a></p>
  
  <p>I still don't see why they couldn't have included that somewhere prominent in the MSDN docs. You know, like somewhere near where they tell you that you can't use WPF if you're using the legacy interfaces.</p>