Friday, April 06, 2012 4:13 AM
Hello! I have got two packages in my vs shell 2010 :
1)my own VSPackage designer to display some data using wpf elements
2)DSLPackage to build dsl models
So,i want to access from 2) code to 1) package data.How to organize this interaction?
- Changed Type andreal90 Tuesday, April 17, 2012 3:14 AM
Monday, April 09, 2012 5:32 AM
The easiest way would be to move your logic and data from the VSPackage to the DSLPackage, including the WPF UI (by encapsulating it in a tool window, see Jean-Marc Prieur's excellent write-up for that).
You would then have seamless integration between the two (including data binding), unless you have special reasons for keeping the VSPackage separate.
Tuesday, April 10, 2012 3:10 PMOwner
If you have further questions around working with services in VS, those are probably best directed to the general VS extensibility forum.
Tuesday, April 17, 2012 3:12 AM
Thanks! And after use the sample with toolwindow , i have got a new quastion - how to bind a data from my custom file in the project from solution explorer to form of custom toolwindow?
I want to click on my file from solution explorer and open it in toolwindow.
Wednesday, April 18, 2012 9:16 AMOwner
That's a broader VS extensibility question that would need to continue in the general VS extensibility forum, but the basic mechanism is to register an editor factory for your file type. VS will then invoke this factory to create an editor instance when required. I suggest you start reading here: http://msdn.microsoft.com/en-us/library/bb166453.aspx
As for opening a "document" in a tool window alone, I'm not sure that makes sense architecturally since tool windows are single windows that float or are docked. Normally you would have a document window as the main editor, one per open document/file instance, and then there may be tool windows that display and/or allow editing of certain aspects of the active document. You can see that the DSL Designer is structured in this way - you have the main design surface, that opens in the document well, and then a series of custom and standard tool windows such as the DSL Details tool window, DSL explorer, toolbox and property grid.
- Marked As Answer by Blair McGMicrosoft Employee, Owner Wednesday, April 18, 2012 9:17 AM