DarksideCookie

Come to the dark side...we have cookies!

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

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkListkick it on DotNetKicks.com
Posted: Feb 25 2009, 19:28 by ZeroKoll | Comments (5) RSS comment feed |
  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Filed under: Silverlight

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

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkListkick it on DotNetKicks.com
Posted: Feb 20 2009, 17:35 by ZeroKoll | Comments (2) RSS comment feed |
  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Filed under: Silverlight

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

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkListkick it on DotNetKicks.com
Posted: Feb 19 2009, 09:50 by ZeroKoll | Comments (0) RSS comment feed |
  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Filed under: Silverlight