Surface event handler being a b*tch

26 04 2011

I struggled a bit with a Surface event handler named TouchMove. What I expected was to be able to trigger whenever my object was moved by touch. This however, did not trigger it one bit. My frustration/anger was unending since I couldn’t know whether or not this was a bug or just working as intended.

I left the breakpoint in the code and proceeded to hook up LayoutChanged as an alternate event handler to track the same thing (in a better way really). After playing around with LayoutChanged for a while the TouchMove breakpoint suddenly triggered seemingly at random. It turned out that the event handler was working perfectly well but that the hitbox of the object I was dragging didn’t move with the object.


  • Moving an object in a ScatterView does not move the object, it simply applies a transform to X and Y.
  • LayoutUpdated is a great event handler, if you like your event to trigger a LOT
  • Never remove old breakpoints Blinkar

NOTE: These event handlers are the same in WPF/Surface 1.0. This are not new features of Surface2. Not removing breakpoints is copyright Viktor Larsson 2011.



Playing with Surface 2

26 04 2011

I recently got an invitation to the Surface 2 early access program. I’ve spent a bit of time playing around with the SDK and it’s really fun (but frustrating) to develop for. A bit like playing Portal 2, which I’m all for Ler


My weekend with Blend and Surface

7 12 2009

This Friday, I got a call from my Boss with a capital "B”. He told me that there had been an interesting development in a business case and that my colleagues Michael and Johan were already on it but that I might want to get in on the ground floor. This turned out to be correct. One of the parts of the project was Surface related (my secret desire, how I yearn for you).

Long story short, I spent a good part of the weekend learning to use Microsoft Expression and making Surface concept images. Expression is indeed a powerful tool and if nothing else, it makes animating objects child’s play. I could never have made some of the animations I made in Expression with regular XAML.

The project and customer are still secret I’m afraid but I’ll post a Surface concept image still.

Slide2 simple

This is a mockup of a radial control which each user has access to literally at their fingertips. I had a lot of fun with the project and I really hope we’re able to sell the idea to the customer.

Monster at PDC – Microsoft Surface responsible

20 11 2009

I love how when everyone’s complaining that MS Surface isn’t serious enough and how it can only be used for novelty this shows up:

(The clip is 6 min long but it’s enough to watch the first 60 sec)

I personally find this hilarious yet not really what needs to be shown right now. I think this video highlights what’s right and wrong with Surface at the same time. The negative aspect is of course that this is 100% novelty and that there is virtually no business application to this. The upside is that it illustrates very well the power and unique capabilities of Surface’s object recognition. This is in my opinion the most interesting aspect of Surface and what sets it apart from other multi-touch technologies. That said, I think what we all want to see is a concrete application of Surface for a real business.

Monster Mashup_thumb

Björn Eriksen recently showed off some of the possibilities Surface could have in healthcare. You can find his video here. This is interesting although it’s only conceptual. Even though the novelty factor is hard to escape I sincerely hope that we’ll see a solid functional Surface app before the end of 2010. If we don’t, I really don’t see where Surface could be heading.