And then Firefox does it differently…reloading the Silverlight control when the css changes…

I’ve, as you maybe know, been working on a Silverlight flickr viewer for my fiancées blog. And now that I have finally got it all done, blogged about it and so on, it was time to actually implement it on her blog. So I took the code from my blog posts and built my services and view models, but tore out the entire view layer and replaced it with a somewhat prettier thing. It has a thumbnail view that is visible in her blog posts. It looks as small Polaroid photos scattered on her page. And then when you click one of them, it changes to a full screen view and shows a larger Polaroid picture with the pictures description an handwriting.

More...

My PageProvider returns no pages... on the first request

I spent a little time yesterday building a simple little PageProvider. For the record, it was an RSS PageProvider that would read an RSS fead and present the entries as pages... Not very complicated or special, but it needed to be done. It's going to be one of the exercises in the new advanced developer course for EPiServer. So, what was the problem...well...my provider worked, but only when I refreshed the page. The initial request would come up empty, but when I refreshed the page it would show up as it should...

More...

Dynamic display causes JavaScript bridge to fail in Silverlight 2 - Update

The problem I wrote about earlier talking about the JavaScript bridge failing when the plug-in is in a div that has it's display set to hidden, is still in Silverlight 2 RTW. But I figured out why. When the plug-in is in a hidden div, the bridge doesn't work, and showing the div from JavaScript and calling the plug-in directly after isn't working either. I tried doing the following, without success:
[code:js]
var hostDiv = document.getElementById("silverlightControlHost");
var plugin = hostDiv.childNodes(0);
hostDiv.className = "hostDivVisible";
plugin.content.ScriptableObjectRef.CallMethod();
[/code]

More...

Annoying "feature" when using Linq to XML in Silverlight projects

I know this has a simple fix, but the error message might not be too clear to some people. If you try to use Linq to XML you must first start off by adding a using statement for System.Linq.Xml. This is very easy to do... Just write the initial XDocument, with the right casing, and then press "Ctrl+." and then enter. This will add the using statement and you can keep going. So you start writing your query but it doesn't work.

More...

Dynamic display causes JavaScript bridge to fail in Silverlight 2b2

 I ran in to an interesting little feature in Silverlight 2b2 the other day. I was trying out a little idea I had. What would happen if I placed a Silverlight application with a width and height of 100% inside a DIV and then tried resizing the DIV using the HTML DOM bridge...? Well, I created a simple Silverlight application, which was basically a big button, and in the Click event I used the JavaScript bridge to resize the DIV dynamically. Worked like a charm. The DIV resized and the application followed along, just like I wanted. Until I started tweaking... 

More...