After creating a BasePage for all my pages and moving the DomainContext initialization to the base class, I got this design time error:
The current instance of WebContext is not available. You must instantiate a WebContext and add it to Application.ApplicationLifetimeObjects within the default App constructor.
Looks like a Silverlight bug, but all I did is checking the design time at the beginning of the constructor:
public BasePage()
{
if (DesignerProperties.IsInDesignTool) return;
...
}
That’s it!