A little while ago I got a question on my blog about how to attach multiple commands to a control. That was something that is so obvious and so obviously not supported in the first version of the command manager. So I quickly wrote a message back saying that I would build that and it would be up on the blog soon. Well…I ran into some trouble…so it took a little longer than expected. And the solution might not be the best, but it works. So here it is…the CommandManager 2.0.
More...
I just came back to Stockholm after spending a few days at Oredev in Malmö. Oredev turned out to be a fantastic event. I arrived in Malmö late Tuesday afternoon and checked in to my hotelroom in the center of the city. Later that evening I got in my "costume" aka suit. I very rarely wear a suit and instead stick to baggy jeans and a hoodie... But since the speakers dinner that night was in the Town Hall, I went for a suit. It ended up being a bit overdressed, but hey...I like looking good once in a while...
More...
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...
I got another question about an issue in Silverlight 2.0 Beta 2. My collegue who is at the moment working on a video-player came to me and asked me why MouseLeftButtonDown- and Up didn't work on the slider and after 2 minutes of Googling we found out that he wasn't the only one faced with this problem. I started by Googling a bit more. Google is a developers best friend, but I couldn't find a solution. I found the reason for the problem, which I confirmed by checking the sliders code in Reflector. It is actually not a change in Silverlight as such, but in the controls that ship with Silverlight. For some reason Microsoft changed the implementation of their controls from Beta 1 to 2 and started letting each individual template part handle their on mouse events.So each part of the control encapsulates itsfunctionality nicely and sets the Handled-property of the EventArgs to true in their eventhandlers. This causes the event to stop bubbling and also renders the MouseLeftButtonDown, Up and so on the control more or less useless.
More...
A couple of weeks ago I had a look at a "module" for EPiServer CMS 5. It's going to be a part of our new package called Create+, and is called InteractiveScene. It basically gives the editor the ability to add and configure Flash-based content using EPiServer.
So, how does this end up being an entry on my blog? Well, it got me thinking. But first off I have is to say that I'm not here to replace InteractiveScene in any way. Neither am I here to tell you to do it. My concept builds on top of InteractiveScene, using it, not replacing it. It would of course be possible to use my thoughts to use this outside of EPiServer, in which case you would have to build the parts that I use from InteractiveScene manually.
So, back to the question, why am I blogging about a third party application for EPiServer? And why the @#!*% am I blogging about something that is using Flash? Everybody knows what I think about Flash... I love it, but don't know how to use it. The whole idea about how to use Flash is built around people who have minds that don't work in the same way as mine. So...thats actually the answer to the question. The "education" I got in "IS" was mostly based around the editors interface. All the cool development is actually made in Flash and just configured through EPiServer and thats no good for me. So I do of course have to find a way to tweak the system to use Silverlight instead of Flash.
More...
A feature that is often missed in Silvelright is the possibility to give the application information at start up. Sort of like sending parameters to a constructor. This is done by passing values through the InitParams property. This feature has been available since Silverlight 1.0, but it has changed in 2.0. A 2.0 application is split in two parts, an Application class and a UserControl, and the InitParams is sent to the Application part. If you listen to the Application.Startup event, you will get hold of an StartupEventArgs object. This control contains a InitParams property containing the values sent to the control. The InitParams is a comma separated string when added in markup, but a IDictionary<string,string> when in code. How you pass it from the Application object to the UserControl is up to the developer. There are several ways of doing this. The simplest is to add a parameter to the contructor of the UserControl and pass in the Dictionary there. Another is to add a property on the Application class and "publish" the information there and let the UserControl fetch it.
This parameter is available to us if we use the <asp:Silverlight /> control. This makes it a very simple way for us to pass a certain amount of data from serverside aspx code to our clientside Silverlight application without having to use Ajax or webservices. Or maybe we could use the InitParams to tell our application the Uri to the webservice...