DarksideCookie

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

SilverTweet – Building a Silverlight Twitter client part 1

A while back, I wrote this blog series about how to build a Silverlight client for flickr. This seemed to be pretty popular among a bunch of the people who stumble across my blog. I don’t know if it was specifically because it was using flickr or if it was because it went through the entire application step by step or if it was something else. But since then, I have gone around thinking about other possible applications that I could dissect in the same way, and for some odd reason I stumbled across Twitter. I know…you don’t stumble across Twitter. It is all over the place, and anybody that hasn’t heard of it is probably dead or deaf  and blind. I’m personally not that active on Twitter, even though I try on and off. For anyone interested, I’m available here.

Anyhow, after having looked at it for a while, I decided to create a Silverlight based Twitter application. Even though it’s not as fancy or useful as some of the other alternatives out there, it will show the basics behind how to build a client. And not a client that just allows you to read a feed, but actually interact with it and send tweets. If you are not interested in how to develop a Twitter client and just want a Silverlight based client, I would recommend Gadfly, which is a fantastic client compared to what I’m going to show. But the idea behind this blog series is not to get the coolest application, but have a look at how one could go about building a client.

More...

Posted: Sep 16 2009, 12:28 by ZeroKoll | Comments (19) |
  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Filed under: Silverlight
Manage post: :)

The CommandManager take 3…

[UPDATE]
The code for the CommandManager has been rewritten due to some memory management issues. And together with that change, I have decided to put it on Codeplex. My blog posts about it are still more or less valid, but I suggest also taking a look at the code at http://agcommandmanager.codeplex.com/.
[/UPDATE]

Once again I return to the CommandManager that I have blogged about before. And I know it is getting boring and that I some day must leave that behind me and go forward. However, after having had a look at Prism/CAG/CAL and seen how Microsoft solves the commanding infrastructure, I have decided that the CommandManager still fills a purpose.

I also had a plan to retire the CommandManager completely and implement something similar using Behaviors. However, Behavior<T> or what ever it is called, inherits directly from DependencyObject instead of from FrameworkElement. This made it really hard to use in this situation, since it doesn’t support data binding. So I had to scrap that idea for now. It seems as if Microsoft uses this idea in Prism, but introduces an extra static object to get it to work… At least in the Prism implementation I have been looking at.

So why do I return to the CommandManager again? Just to argue that it is great and boost my ego? No…apparently, my previous implementation had a flaw. I might have a lot more, but I discovered one that caused problems. So I have rectified that…

More...

Posted: Sep 14 2009, 05:25 by ZeroKoll | Comments (9) |
  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Filed under: Silverlight
Manage post: :)

Adding some style to the loading screen…

There is a simple little feature available in Silverlight that I think everyone should use, or at least more or less everyone. It is the possibility of adding a custom loading screen that will be shown while the plug-in downloads the Xap. It is simple to implement and gives your application that little extra to make it stand out. If you look at Flash for example, you will see that every Flash application has its own loading screen. During the time that the application downloads, you can display how much has been downloaded, but you can also give the user something to look at or even do. My favorite loaders the ones that gives you a simple game to play with while the application loads. This however, is only useful if the application is really big. And in that case, I would recommend splitting up the application in smaller pieces and load them on demand. Anyhow, how do we do it?

More...

Posted: Aug 31 2009, 07:33 by ZeroKoll | Comments (0) |
  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Filed under: Silverlight
Manage post: :)

Adding transitions when changing DataContext

I have several times gotten in a discussion regarding the visual aspects around changing the DataContext. That sounds like a really interesting discussion, doesn’t it…? Well, why is it a discussion at all, why is it something that I even bother writing about (just wait until you see the amount of code I have written as well)? Well…as you might have noticed in my previous posts, data bindings are very central in Silverlight development. At least if you do it like I do it. And that means that we work quite a lot with the DataContext of different controls. And out of the box, changing the DataContext will update all the binding, which is exactly what we want. But what happens when we DON’T want the change to be instantaneous? What if we want to add some form of transition? Well…as far as I know, you are %$@ out of luck. That is why I decided to try and build something that can do it for us…in a nice re-usable package…

More...

Posted: Aug 25 2009, 10:13 by ZeroKoll | Comments (2) |
  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Filed under: Silverlight
Manage post: :)

Live Writer plug-in for code snippets

I just remembered that I just HAVE to recommend this great plug-in for Windows Live Writer. It is the plug-in I use to add code snippets to my blog posts. There are a few things design wise I would probably want to be able to change. For example being able to turn off the scrollbars and show all the code formatted straight up in a nice way. But except those minor things, it is a great plug-in. You can find more info about it here and download it here.

If you know any REALLY good plug-ins for code blogging, don’t hesitate adding a comment about it. I’d love to find more goodies…I just don’t have time to go looking for them…

Posted: Aug 25 2009, 10:10 by ZeroKoll | Comments (0) |
  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Filed under:
Manage post: :)

Using DataTemplates in custom controls

I found this question on the Silverlight forum today (it might be “the other day” since I don’t know if I will even be able to publish this today) that I wanted to answer by creating a post. Why not just point towards someone else’s blog? Well…I tried that…but I couldn’t find one by doing a couple of simple Googlings (I love that new word…I will keep it and nurture it)…so I came to the conclusion that if it is that hard to find the information, it needs to made more available…on my blog…

So..what was the question? Well, the guy wanted to know how to use templates in a custom control. That sounds like a pretty simple request. There has to be lots of information available about this…well…not really apparently. In general I would recommend reflectoring it, but in this case I felt it was better to explain. So here we go…

More...

Posted: Aug 03 2009, 13:26 by ZeroKoll | Comments (10) |
  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Filed under: Silverlight
Manage post: :)

My thoughts about Expression Blend 3, aka Blend rant

I want to start off this blog post with saying that I love Expression Blend! I have only used Blend 2 SP 1 before today, but I love the idea, the interface and the program in general. But in Blend 2, there were a few things I missed. The most obvious flaw in Blend 2 is the missing intellisense. It also expected me to do ALL my coding in VS, which to be perfectly honest is a good thing. Coding should not be done in Blend. Blend is the tool for the interaction designer, or possibly the “devigner” and not for the developer.

But this is where I start getting a little ambivalent. I want to be a good developer and say that that is the way that I generally do my Silverlight problems. The developer doing the coding in VS and the designer doing the layout on Design and then the interaction designer/”devigner” putting it all together in Blend. Unfortunately that doesn’t add up in my world…sorry Microsoft…I love the idea, but in my world it doesn’t work, even though I wished it did.

More...

Posted: Aug 02 2009, 10:07 by ZeroKoll | Comments (3) |
  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Filed under: Silverlight
Manage post: :)

Bindings, the glue that connects the view to the viewmodel part 2 (and apparently a bunch of data validation information)

Welcome back! Or possible Welcome! Sort of depends on if you saw my previous post… Anyhow, you have probably figured out that it is time to go on with even more binding information. In the previous we looked at the basic binding syntax and functionality. So, what’s left? Well, a bunch of small, medium and large details…

More...

Posted: Jul 27 2009, 12:33 by ZeroKoll | Comments (0) |
  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Filed under: Silverlight
Manage post: :)

Bindings, the glue that connects the view to the viewmodel part 1

If you have read anything I have written in the past, you are probably familiar with the fact that I am a huge fan of MVVM. There will have to be a lot of convincing before anyone gets me to switch pattern when working with Silverlight. There are several things one must learn and understand before one can use MVVM well.

There is the obvious part of learning the actual pattern and how it works. Learning how to build a good viewmodel, which is dependent on the data model and time and other circumstances. I know that there are a lot of people out there, especially bloggers, that will tell you that you have to build something according to this or that and be a true purist to be a good developer. However, a lot of these people forget that most of us do actually have clients that don’t feel like spending 2 months or $10.000 just to get it to be a perfect solution. In most cases one must adhere to this and make the best of the situation.

More...

Posted: Jul 23 2009, 08:59 by ZeroKoll | Comments (2) |
  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Filed under: Silverlight
Manage post: :)

HtmlPage.PopupWindow is flawed in IE

Or at least in IE 8. I haven’t been able to try this in IE 7 or even the dreaded IE 6, but it is flawed in my browser. If you try opening a new window by calling HtmlPage.PopupWindow and try to have it resizable it does not make it resizable. (BTW, Silverlight calls the property Resizeable, while Live Writer tells me it should be spelled Resizable…hmm…I’m Swedish, but that gives me mixed signals…)

More...

Posted: Jul 17 2009, 06:12 by ZeroKoll | Comments (2) |
  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Filed under:
Manage post: :)