How to use ApplicationContextApplication?

Topics: CAB & Smart Client Software Factory
Aug 31, 2007 at 9:45 AM
Hi All,

I am using smart client application for building office addins (using VSTO).

Could any tell me how to use ApplicationContextApplication?

Sep 5, 2007 at 5:11 PM

To use the ApplicationContextApplication class, the main class of your application (the one that contains
Main() method) must inherit from it.

if you look the header of the class:

public abstract class ApplicationContextApplication<TWorkItem, TShell> : WindowsFormsApplication<TWorkItem, TShell>
 where TWorkItem : WorkItem, new()
 where TShell : ApplicationContext
you will see that the passed TShell, must be an ApplicationContext, therefore your Shell form must inherit from ApplicationContext. If you are using the Smart Client Software Factory, you will need to make the SmartClientApplication class extend the ApplicationContextApplication class instead of FormShellApplication.

These posts explain how to host CAB Applications in Office. You might find them useful:

Let me know if this helps.

Mariano Converti