Hi there,
usually (i.e. when a Silverlight app is embedded in an HTML page) one has to set the "enablehtmlaccess" parameter to true for the app via HTML or JavaScript, because otherwise calls like HtmlPage.Window.Invoke are not allowed (and throw an exception).
So I guess the problem is that blend does/can not set that parameter and only shows that message instead.
If you have control over the code, you could add a condition that checks whether you are in design mode or runtime mode using DesignerProperties.IsInDesignTool, for example:
if (!DesignerProperties.IsInDesignTool)
{
// Do the "evil stuff"
HtmlPage.Window.Invoke("GetPrimaryGradStart");
}
Hope that helps.
Cheers, Alex
EDIT: If it does help, you might also want to add some pre-compiler directives to your code so that you won't have those design tool stuff statements in your production app:
#if !RELEASE
if (!DesignerProperties.IsInDesignTool)
#endif
HtmlPage.Window.Invoke("GetPrimaryGradStart");