Quick little update…

I just found out that commenting has not been working for a while. Not that I think more than 1 or 2 people have noticed it, but that’s the case anyway. I have now fixed that problem and commenting should be up and running again… Sorry about that!

On another note, I know I have not posted a lot lately, but I have been on vacation and when I got back to work I had a pile of things to take care of. The good thing is that there will hopefully be a bunch of posts going online soon as I am heading to the MIX conference in Las Vegas on Saturday. I start off by helping out on the Azure lab (or watch Chris Auld in action…) on the Sunday and then follow that up with LOADS of Windows Phone 7 Series !@&%£* that is long…It will probably turn into WP7 real quick) sessions. I will also attend a “train the trainer” thing for the Windows Phone 7 Series. So hopefully I will be able to tell you all about how it is developing for Windows Phone 7 Series devices real soon.

The CommandManager that never dies…and ends up on Codeplex…

The other day, a reader called MAX pointed out to me that the CommandManager has a major flaw. It stores all commands in a static list. This keeps the garbage collection from working as it should, as the commands are always referenced. The commands in turn reference the controls that use them. So the CommandManager actually keeps any control that uses commanding from being GC:ed. So, because of this, I have changed the CommandManager code once more. This time however, I have not just added some information here and posted the new code for download. Instead, since the CommandManager seems to never die, I have put it on Codeplex making it available at http://agcommandmanager.codeplex.com.

The CommandManager never dies? …have I forgotten about Silverlight 4? No, not at all. Silverlight 4 has a bit of commanding built into it. It supports binding ICommands to Command properties on some controls, such as Buttons. This is great and will definitely limit the need for the CommandManager. The CommandManager has one thing that Silverlight 4 does not have. It supports binding ICommands to more or less any event. So if anyone needs this kind of flexibility, the CommandManager is the way to go…

Update to the multi-touch development intro

I am apparently a completely useless mathematician, which I actually already knew. I apparently also suck at testing my software before putting it on my blog. There was an error in the TrigUtiltity which caused the application to work less than perfect if we put it like that. And since nobody has complained, I assume that nobody has actually downloaded the code. Or everyone that has, has found the error and fixed it without telling me. Anyhow, this post is now updated and the download is fixed… DarksideCookie.TouchDemo.zip (135.45 kb)

Silverlight 4 COM-interop…I can’t believe I am excited…

Silverlight 4 has now been out and about in beta for a couple of months and I still haven’t knuckled down and tried it out to any great extent. I have just been too busy at work with version 3. But I guess there is a time for everything, and now is the time for me to get started on version 4…

Silverlight  introduces a heap of new and cool features. Everything from webcam support to more features when data binding and support for printing. This time however, I have decided to write about COM-interop.

More...

Serving up Silverlight without IIS/webserver

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...

Silverlight and non-IIS hosted WCF-services

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...

Button “hacks”

After that somewhat useless title, let me explain. I’m currently working on a kiosk application in Silverlight (there will be more about it later). And while working with it I had two issues with the Button that comes with Silverlight. First of all, as with most controls, it swallows some of the events that I needed, and second it raises the Click event before the VisualStateManager takes the state back to Normal. The second one is very specific to my kiosk application, or at least to touch screen interfaces…so I wrote a couple of custom buttons to help me with these problems…

More...

OpenXML + Silverlight using a little library

As I mentioned in my last post, I decided to try to create a simple little OpenXML library for Silverlight. The goal with the task was to see how it could work and if it was possible to roll it in to something useful. And to be honest, it is very useful. And even though the library that is available for download at the end of the post is small, it is aimed to be as open and flexible as possible. A small intro on how to use it might be in order…

More...

OpenXML + Silverlight

I’m back again with another one of my interesting and insightful posts…or well…at least another post. Unfortunately, since it is quite a big subject, I will have to divide it in to two parts. This first part contains information about what OpenXML is and how to use Silverlight to creates office documents. While the second part will show the how to use the simple library I built to make it simpler.

For those of you who don’t know what OpenXML is, it is a standardized XML based format for storing Office type documents, which is used by MS Office as well as some other office packages. It is certified by ISO as well as ECMA. You can read a lot more about it at http://www.openxmldeveloper.org. Normally you work with it using the OpenXML SDK, but that is not available to Silverlight…yet at least…

I personally had very little experience in the format as such, until recently. Just before x-mas, I got assigned to a project at my company that opened my eyes to it though. I got the honorable task, together with another developer at our office (who actually did most of the work), to update the lab material on the OpenXML Deverloper site and make sure it worked with the upcoming Office 2010. After just a few slides about the standard, it dawned to me that it seemed like a pretty simple task to implement a small, but extensible, OpenXML library for Silverlight. So I did…

More...

Silverlight 3 multi-touch development 101 – pt 3 - Rotation

Welcome back for the 3rd part of the multi-touch 101 series. If you haven’t already read the previous parts I suggest that you do so as the code in the current part will build on top of the code from the previous parts. Part 1 is available here and part 2 here.

This part will cover the last type of gesture that the demo application uses – rotation. For me, the rotation is by far the most complicated thing to implement. Not because the code is very complicated, but because the math behind it isn’t that simple. Well…the math is actually not that complicated, but most of the developers I know are not big fans of trigonometry and thus couldn’t really help me out when I had questions. I even called up my dad who used to be a math teacher. But when I explained what I was trying to do, he just shook his head and wondered what I was talking about…But let’s get started.

More...