Silverlight Events

events: {

onLoad: Silverlight.createDelegate(scene, scene.handleLoad)

}



Silverlight.createDelegate = function(instance, method) {
return function() {
return method.apply(instance, arguments);
}
<Canvas MouseLeftButtonDown="Play" x:N...
<Canvas MouseLeftButtonDown="JavaScript:Play" x:N..

function Play(sender, eventArgs)
{...
handleLoad: function(control, userContext, rootElement)
{
this.control = control;

rootElement.addEventListener("keyDown", Silverlight.createDelegate(this, this.handleKeyDown));
},

handleKeyDown: function(sender, keyEventArgs)
{
alert(keyEventArgs.key);

}
How to go fullscreen....
handleMouseUp: function(sender, eventArgs)
{
host = sender.getHost();
host.content.fullscreen = !host.content.fullscreen;
}