In many examples you will see the Silverlight control passed into handleLoad as the plugIn parameter, and stored as a member variable,
handleLoad: function(plugIn, userContext, rootElement)
{
this.plugIn = plugIn;
This is typically done so that you can use the plug-in object in other member methods, such as event handlers.
var rect = this.plugIn.content.FindName("myRect"); rect["Canvas.Left"] -= 50;
An alternative, however, is not to store plugIn as a member variable, but rather to retrieve a reference to the Silverlight control when you need it, by calling GetHost() on any convenient Silverlight element
handleLoad: function(plugIn, userContext, rootElement) { var rect = plugIn.content.FindName("myRect"); rect["Canvas.Left"] = 300; rect.addEventListener("MouseLeftButtonUp", Silverlight.createDelegate(this, this.handleMouseUp)); }, handleMouseUp: function(sender, eventArgs) { var plugIn = sender.GetHost(); var rect = this.plugIn.content.FindName("myRect"); rect["Canvas.Left"] -= 50; }