As you probably know, TechEd US has just passed. I didn’t get to go (like always), but I did get to make my mark on the conference. I got to build one of the apps that Microsoft demoed on stage. I have actually built a bunch of demo apps for Microsoft and their conferences the last year. At some point, I will actually try to find them at some point a post some videos of them here. But they involve a CRM demo with a phone company, a SharePoint demo with a racing team and some other bits and pieces. Anyhow…this year my demo was a Word add-in, and my personal opinion about this project, before it got started, was that it sucked. I I’m not very fond of building Word add-ins as you might have guessed.
More...
The day before yesterday I was part of a Windows Phone 7 training day here in Wellington, New Zealand. Most of the day was presented by Nigel Parker, Web Development Advisor for Microsoft New Zealand, but I got to present some code demos for the attending developers. At the training, I promised to upload my sample code, so I did. But I also added some of my thoughts after the event. Sorry…
More...
While working on a little MVVM thingy the other day, I ran into a sweet little piece of code that I wanted to share. I have seen several version of this around the web, but this is where I found this particular version. The piece of code gets rid of the ugly part of the INotifyPropertyChanged interface. The part where you use strings to identify what property has changed. I understand that that is how you have to do it, but it feels messy. A common solution is to add constants to hold the strings, but that is not a very much better solution. it is still messy. So how can we handle it in a safe way? Well…one idea would be to do it like this…
More...
A couple of weeks ago, Microsoft asked me to add closed captioning to the videos on the www.office2010themovie.com. And no…not automated subtitles that converts to what is said into text, like YouTube does…just subtitles from a file. This is not very complicated, not even when you add the fact that the videos are actually being streamed using Smooth Streaming. But I wanted roll it al into a control, to make it fast and easy to add subtitles to any MediaElement in future projects…
More...
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 last post I wrote about how I had created a ViewModelLocator that was a bit different from what everyone else was using. I had come up with the awesome idea to use the same VMs at design-time as I used at run-time. This idea sounds very good, as it means that I only needed to build a single set of VMs and instead could switch the service implementations using DI. At the time, it sounded like the most “correct” solution. Little duplicated code, no chance of messing up the bindings and so on…but it has a huge problem…
More...
[UPDATE] This post is somewhat interesting, but the idea doesn’t really work in the real world. More info HERE [/UPDATE]
I have tried to stay out of certain areas when I blog. Why? Well, simply because some things are still heavily debated, and some debates even seem a bit infected. Some topics seem to cause people to get somewhat rabid and I don’t feel like causing a big flame war of any kind. But still, I have decided to talk a bit about some of the options we have when binding our views to our viewmodels, or vice versa. I can’t even write that with out having to be careful…
More...
Ok...I'm back with the final post about extension/plug-in loading in Silverlight. Well, at least I think it is the last as I have tried all obvious ways. I have previously showed how to it manually here and then how to do it "automatically" using MEF here. Both these have some upsides. The custom solution is tiny from a download perspective and offers a lot of control. MEF on the other hand automates a few pieces of the solution, still offering a lot of manual control. The download size does however grow a lot compared to the benefits gained. So, so far, I would say that the custom way is the winner. At least as long as the requirements are as simple as they are in this case...
This last post is all about doing it according to the Composite Application Guidance (CAG). CAG is a set of guidelines and patterns for building composite applications in WPF and Silverlight. The CAG is implemented by using the Composite Application Library or PRISM framework. CAG talks about how to do it, while CAL consists of assemblies helping the developer to actually do it. At least that is the way that I have understood it.
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...
Building an application based on discrete pieces (plug-ins) isn’t a new thing. It has been around for ages. Loads of applications support a plug-in model. So, obviously you can do the same using Silverlight. There are even a lot of different ways of doing it. They all have benefits and cool tricks up their sleeve, but they also come with bad things as well. I have decided to take a look at three of the more common ways of handling this whole thing. The first attempt I’m going to show is using the good old “I’ll do it myself” approach. I want to start out in this end, and then compare two other common approaches to the custom built one. This way I feel that you can thorough comparison.
The other two approaches I will show are Managed Extensibility Framework, commonly known as MEF, and Composite Application Guidance, also known as CAG or Prism. And to be honest, I don’t know if the third option should be CAG/Prism or CAL (Composite Application Library), but who cares. You know what I mean…
More...