A couple of weeks ago, I requested to build a code sample for Microsoft. It was supposed to make it possible to restyle a Silverlight application based on a SharePoint 2010 theme. In SharePoint 2010, theming is based on OpenXML, and saved as files with an extension of “thmx”.
But I guess the first question would be WHY you would use a huge thmx file just to restyle a Silverlight application… Well, imagine that you are building Silverlight applications that are to be used inside a SharePoint application. Imagine how nice it would be if the Silverlight applications would change appearance if you changed the theme of the SharePoint site. That way, changing the theme would not be a problem, and would not cause a whole lot of rework.
More...
In my previous post I wrote a demo application that used a custom implementation to load plug-ins from the server and place them in a shell. This implementation was very specific and limited in its functionality. It did however do what I needed for the simple task at hand. This post is all about how we can do the same thing using the Managed Extensibility Framework (MEF). MEF is of course a lot more flexible and powerful than my simple implementation, and then what I am about to use it for. But I will build the same application using MEF anyway, and show you how it works in comparison to the custom solution.
More...
In my previous post, I showed how to host WCF services. In the kiosk application that I am working on, I have, as previously mentioned, decided to not have IIS run locally on the machine. I have also decided host the Silverlight application locally. I do not want it to be fetched from the server for different reasons. So how can I serve up a Silverlight application without a webserver? Well…I am already hosting WCF services in a windows application…why not let the windows application serve up the Silverlight application as well?
WCF actually gives us this possibility very easily, and here is how it is done. I’m going to re-use the application from the previous post, so if you haven’t read it, I recommend doing so…
More...
I’m currently working on a kiosk application for a company called TicketDirect. They sell tickets to different events all around New Zealand and have decided to create a kiosk based solution where customers can buy tickets. The application needs to be Silverlight based for a couple of reasons, and must run Silverlight 3 as 4 doesn’t have a go-live license yet. The problem with this is that the application needs to talk to a credit/debit card unit as well as a ticket printer. The problem as you probably realize quickly, is that these units are connected to the computer physically and therefore are not available to Silverlight. And yeah…as you know, printing support is “limited” in Silverlight, so printing custom ticket layouts to a special ticket printer will not work…
This is how I solved it. I created a couple of WCF services to run locally on the machine and then had Silverlight connect to those to access the local system. The problem was that I did not want to run IIS on the local machines. Why? Well, for different reasons…such as the need for simple XCopy deployment. So the services would be hosted by a Windows application instead.
More...
Lately, I have been bombarded with talk about inversion of control (IoC), dependency injection (DI) and service locators. Unfortunately, I have also heard a lot of odd comments that doesn’t really make sense. But I think that is because people are having trouble separating the different words and understanding what they actually mean. So I thought I would try to explain the different things as I have understood them. And do so using a simple understandable language, instead of the often overly complex way that a lot of other people use.
More...
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...
At my talk at TechDays 09 here in Sweden, I was followed on stage by two guys from RTC Factory. They were there to talk about the workflow between the developer and designer. One of the big upsides to Xaml and Silverlight/WPF is that we can split the design and coding between the developer and the designer. No more mock-ups from the designer that the developer needs to implement. In the world of Xaml, the developer creates the functionality and the designer the design. Like it should be. We are all specialized within our area, which is natural. And hence it is also natural to split the responsibilities. So how does this work?
More...
I’m on the train on my way home from speaking at the TechDays conference in Västerås, Sweden. Unfortunately my talk about Xaml turned into a spiraling tornado of crap. And you can quote me on that. I guess that trying to prepare a talk at a developer conference at the same time as you are working fulltime, packing up your life for a move around the world as well as trying to focus on a whole different tech area (Prism 2) is not a good solution. It turned out to be a pretty mediocre or even sucky presentation lacking structure. So for all of you who attended by talk, I’m really sorry! I know I shouldn’t come up with excuses, I blew it. But that’s the way it goes sometime…
More...
Microsoft released some really cool charting controls a while back. ScottGu writes about it in one of his blog posts. It is a sweet little collectio of charting controls both for windows and web development. In the web scenario, you add a specific webcontrol to your page, give it some data and it renders it nicely. At least that is the simple explanation. There is a LOT more things you can control and tweak to make it look like you want it. However, this time I'm actualy using the windows parts of the controls. Reason? Well, I need to create some charts in memory to be added to a PDF document. So I don't really want a webcontrol... So, here are some of my thoughts after working with it for a couple of hours.
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...