To demonstrate this feature I created a simple but interesting sample:
HtmlPage.Window.Invoke(“moveBox”, newX, newY);
That is all I have to do!
[ScriptableType] public partial class Page : UserControl
[ScriptableMember] public void MoveBox(int x, int y)
silverLightControl = document.getElementById(“silverlightControl”);
Once I have a reference to the Silverlight control I am able to invoke the method which I marked as a ScriptableMember using the object name I registered:
The code for this sample can be found here: [download id=”15″ format=”3″]