I'm trying to create the a WPF/E control and hook up a some events after it has loaded it's XAML. I've trying a zillions of ways to hook up the onload/onloaded/loaded event (or what ever it is called - the doc is not too clear on that), but no luck. I'm also confused on whether I should hook the event to the host or to the WPF/E Control
Basically here's what I'm trying to do:
this._host = new agHost(
this.get_element().id, // hostElementID (HTML element to put WPF/E control into)
this.get_element().id+"_wpfeControl", // ID of the WPF/E ActiveX control we create
this._width, // Width
this._height, // Height
this._backColor, // Background color
null, // SourceElement (name of script tag containing xaml)
this._template, // Source file
"false", // IsWindowless
"30", // MaxFrameRate
null // OnError handler
);
this._wpfeControl = document.getElementById(this.get_element().id+"_wpfeControl");
// Hook up load event (which doesn't work)
this._host.OnLoaded = function() { alert('XAML loaded'); }