Replies: 1 comment
-
You mention that the Host application is expecting a UserControl, I assume this refers to either a WPF or Windows Forms control. This would also possibly imply you are providing an assembly to the host application, from which your UserControl will be loaded. What you're suggesting is absolutely possible. However, with some complications/caveats. Unless AutoCAD has support for hosting Prism modules (unlikely but possible, I will be pleasantly suprised) then you will most likely not find support within the Host app, for some or most Prism functionality/features. This might mean you'd need to design your app with the context of being a UserControl in mind, rather than being a stand alone application; it makes a big difference for things like routing, boot time / start up of application, resources available, in the container you choose, etc. You might also want to check and ensure some details such as the "bitness" of your target code (confirm x86/32 bit or x64 required), as well as complications/requirements that the host might have such as code signing/strong named assemblies. Also, how will your plugin/control be distributed to your end users, usually this is a very painful problem to solve and leave some time to think about it. It will maybe help to first try just host a "blank" control first, then start filling in your functionality bit by bit. I can encourage you that such scenarios absolutely can work. Though there's surprisingly little mention of it generally in the .Net community. You might get more help for hosting specifically within AutoCAD by posting on a site that is supported by that community. I would not by any means consider myself a Prism guru but have done some application integration in a similar space to this, hope the above is helpful. |
Beta Was this translation helpful? Give feedback.
-
Here is a 'tricky situation' for all the Prism gurus out there.
My app is a plugin in a CAD host - with the CAD host being AutoCAD.
The exact host is not really relevant.
My app is all set up with Prism - and is working well.
In the usual scenario the Host is calling in my code and my code will display a Prism View/ViewModel using the DialogService.ShowDialog().
The problem is that in some cases I have to provide content into a window that is created/managed by the Host application.
In such cases the host application expects me to instantiate and return a UserControl that will be displayed as a child in the window managed by the Host application.
Now I am not even sure how to ask this... but, the question is something like:
Is there any chance that I could create/instantiate a UserControl that is "wired up" (?) with Prism and return it to the host application to be displayed in the host application's content window?
Any feedback would be greatly appreciated.
(Let me know if you have any questions)
Beta Was this translation helpful? Give feedback.
All reactions