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...
13. October 2008
ZeroKoll
EPiServer
One of the more usefull extension points in EPiServer is the ability to create custom properties. That and GUI Plug-Ins. Those 2 extensions are probably the easiest and most used way to extend the functionality in EPiServer CMS. So how do you create a custom property? Well there are several ways to learn it. You can either go to one of our courses at EPiServer, and maybe even meet me, or you could read an article about it on http://world.episerver.com. It is actually a good article written by one of our developers in Ukraine, Denis Yakovlev. But you could also read this blog entry.
More...
12. October 2008
ZeroKoll
EPiServer
I just spent some time trying to get my WCF Service to work on my EPiServer CMS 5 R2 installation. It was a lot more complicated than I thought it would be.
I had built this Silverlight application using a test application, launching it in the VS webserver and everything was working fine. It was a small Silverlight application that used a WCF service to get some data from the server. The epplication worked perfectly...until I decided to deploy it to my "real" site using IIS 7... The "real" site was an EPiServer application which caused some problems.
I deployedmy Silverlight app as well as my service to the site I was going to use. Deploying the application meant copying the xap file as well as the svc and assemmbly to the server. I also copied my service configuration to the web.config file. After this I opened my browser and browsed to localhost. And behold...a broken Silverlight application. The application started, but soon came to a screeching halt as it tried to connect to the service. Since the application actually loaded, I came to the conclusion that the IIS configuration for the Silverlight things were ok and that it was the service that was the problem.
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...
At the EPiServer developer summit a couple of weeks ago I held a session about multilanguage support in EPiServer. For those of you who were there, you know why I've added this entry. I screwed up the demo completely and promised to upload the demo code to my blog. My, at that moment, not existing blog. So here it is. I've created a blog and added the code for download.
More...