Please ignore this post—I’m doing some tests with Silverlight 2.
I just did a test to see if I could overlay a transparent InkPresenter over a blog post. Wasn’t successful.
I can get a transparent ink div to overlay an html page just fine in the VS2008 environment, but I can’t get it to work in this blog.
I tried setting up a div that contained a Silverlight 2 beta object which overlaid the text in a post. However, although I could see the Silverlight object (which was the wrong size by the way) I couldn’t get any mouse events to work–so no ink. I’m guessing I did something wrong, but since I don’t have time right now to figure out what it is, I’m going to jot down a couple notes and revisit this issue later.
Here are a couple things I learned along the way, which you should read with beta-colored glasses:
* InkPresenter allows you to define mouse events in Silverlight 2, but they don’t seem to work. I attached the mouse events to a parent control and all worked fine from there.
* I was using a child div with absolute positioning set to 0,0 that held the Silverlight object:
<div id=”silverlightControlHost” style=”position:absolute; visibility:show; left: 0px; top: 0px; z-index:2″>
and with a parent div set to relative positioning that contained the blog post text:
<div style=”position:relative”>
This arrangemnt worked fine in a test setup (the Silverlight control appeared at the top-left of the text div in my test), but not in a WordPress blog post. Maybe it’s the divs.
* I had to turn off the WYSIWYG editor in WordPress in order to enter my divs without getting things automatically converted to paragraph elements.
* I need to register a MIME type for extension .xap as application/x-silverlight-app within IIS on the server.
I’m probably doing a handful of things wrong. Much more to learn.
Let me double check that I can actually get a Silverlight 2 object to appear in this blog:
I should see an inkable, yellow area 400 pixels wide by 200 pixels high.
Nope…still not working. I need to ask Layne if he can double check whether a mime type for .xap is setup on the server. I’ll ask him tonight.