-
The code snippet in the documentation is for a WPF project which has Application.xaml. However, I'd like to use Stylet in an Office VSTO add-in project. How and where should I bootstrap Stylet? Please advice, thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 21 replies
-
I'm afraid I don't have any experience with Office VSTO add-ins. You don't need to use the ApplicationLoader, but if you don't you'll need to construct the Bootstrapper yourself (and call its |
Beta Was this translation helpful? Give feedback.
-
This is what Office VSTO project look like. Basically it defines a class and subscribe to Office startup and shutdown. The bookstrapping point is at "ThisAddIn_Startup" call back. |
Beta Was this translation helpful? Give feedback.
-
FWIW, I was able to use Caliburn.Micro in an previous Office VSTO project. What I did was in that "ThisAddIn_Startup" callback do the following initialization where
When I click a button on my addin ribbon, it fires a callback and I can launch GUI using the code below:
|
Beta Was this translation helpful? Give feedback.
-
So I dug into the Here is another question: does rootview bear any importance thru out the program life? Can I not assign it at all, I mean, get rid of |
Beta Was this translation helpful? Give feedback.
So I dug into the
Bootstrapper
class and looks like if I don'tLaunch
, I should be able to initialize Stylet without showing any Window, right?Here is another question: does rootview bear any importance thru out the program life? Can I not assign it at all, I mean, get rid of
_rootViewModel
,RootViewModel
all together?