3 Projects - one for SL application, one for the hosting Web site, one for the custom control. So the App only has one Page, the default. Page xaml has the custom control I created. The custom control is skinnable using Style with the Tempalte Setter. The
"draw" on the control.
The effect is NullReferenceException. That is because inside the control RootElement was not yet instantiated. That is because MyCustomControl.OnApplyTemplate has not yet been called. it is inside OnApplyTemplate I instantiate ElementRoot
ElementRoot = GetTemplateChild(ElementRootName)
The long question - what is the inner mechanics? I assumed without actually knowing, that plugin loads, it downloads the XAP, creates teh App, hence App.App() is called, then it somehow calls Application_Startup and Page() gets created, where its Loaded event
is routed to Page_Loaded handler