The CommandManager…again…

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

Designer – Developer workflow…?

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

TechDays ‘09 – Poor performance Chris (let’s blame the world)

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

Creating a command manager in Silverlight 2

After having worked a bit with the Mode View ViewModel pattern in Silverlight, I've sort fallen into a trance chanting "MVVM, MVVM, MVVM". It gives the developer such a good platform to work with. The MVVM pattern is a modified version of the MVC and MVP patterns. By now, you are probablyabout to closer your browser due to the pattern rant I'm on. Well, don't. This isn't about MVVM really, only a little. The MVVM pattern was "created" by John Gossman at Microsoft, specifically to target WPF. This also means that it works great in Silverlight. But Silverlight is smaller, and missing some features... The CommandManager is one of them. This post shows a way to handle this shortcoming.

More...

Creating custom controls in Silverlight - part 2

In part one, a button like control was created. It worked like a button, or at least a little. It was a square with a descriptive text and a brand new Click event. Unfortunately that doesn't really make it feel like a button. There is more to a button, especially in Silverlight and WPF. First off, a button normally gives some visual feedback to the user, confirming that it is pressed or that the button is hovering over it. That visual feedback is something that you find in most button implementation, whether it is in Windows Forms, HTML or WPF. The thing that is special with buttons in WPF and Silverlight is that the content of the button - in this case the descriptive text - can be anything. And I mean ANYTHING. It could be a Grid with several controls inside. Not that I would recommend doing some of the things that you CAN do, but it is possible. So in this part of the tutorial, the button will get visual feedback and support for complex content.

More...

Creating custom controls in Silverlight - part 1

After having written mhy previous entry about how to style and template controls, I guess it is a good time to have a look at how to create controls that are template- and styleable. (Can you write "template- and styleable"? Looks weird...well...I am swedish so I'm allowed to write less than perfect english) Unfortunately, due to my lack of imagination, I don't have a really cool control to build and show you. So instead I'm going to create a very limited control that will work more or less as a simple button.

More...

"The ExternalStyleManager" is obsolete...or something...

Well, here it goes. I'm now going to publicly yell out the fact that I'm a lazy, ignorant person. A while back I wrote a little demo on how to store styles externally using my "ExternalStyleManager". I thought the idea was good and served a purpose besides being a good example for using attached properties... Well...

More...

Quick initial impressions of Microsoft "new" Charting Controls

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

Storing application wide styles in external files, aka "The ExternalStyleManager"

A couple of the guys at my company have started working on an internal Silverlight application. One of the guys is a former WPF developer, which gives him some serious advantages when starting with Silverlight. It actually gives him some serious advantages compared to my own sorry ass as well. However, it has some downsides as well. Downsides that sometimes end up with him sending me annoyed MSN messages.

He expects a bunch of WPF specific features to be available in Silverlight. I understand the "confusing". SIlverlight development is very close to WPF, except for the fact that Silverlight is in some aspects is tiny compared to WPF.

More...

Silverlight 2 templating and styling

I have spent a lot of time checking out Silverlight and its features. I have also spent a lot of time talking about it to a lot of people. And a reasonably large amount of the people I have talked to, have asked me about templating and styling and about how it works and the differences. I myself also had a little uphill battle to sort out the terms and get going... So I thought I would write an post about it... Sort of explaining it from my view.

More...