Xbox Friends Watch - a Sidebar Gadget using Silverlight

[UPDATE: version 1.1 has been posted, performance improvements and an auto version checker now included.]

HALO 3 is out and my Xbox is now getting the love it truly deserves.  Multiplayer mode in HALO is a lot of fun and even more fun when you can play with friends.  Thus, a perfect opportunity was born to create a useful sidebar gadget.

I've recorded a demo on how the gadget works available on Channel 9 and you can download the gadget directly from my server, although I will be posting it to the Gadget Gallery shortly.

Just make sure that before you run the gadget you install Silverlight 1.0, otherwise the gadget will not work.

My data source for Xbox Live information is coming from Duncan Mackenzie's REST service and the UI is done completely in Silverlight 1.0.  This turned out to be a really fun project and the Sidebar hosting environment was a great place for a Silverlight application. 

One of the most obvious benefits is that within the Sidebar you can make cross-domain calls, no need for any server-side proxies.  You also gain access to certain System properties and a small data storage model all through the Gadget API.

I foresee more Silverlight-based Sidebar Gadgets in the future, I'm looking at you Twitter API...

posted on Oct 24th, 2007 | Permalink | Comments (77)

77 Comments »

  1. Awesome gadget. Just installed it and it works great. I have been waiting for so long for a gadget like this so I can see when friends log on while I'm on PC.

    Question

    Is there anyway to resize the gadget so I can put more than 5 friends on it? As it is now I can add more than 5, but I can't see them at the bottom and I can scroll down to see them. It would be nice if we can resize the gadget or you add a scroll button so we can scroll down the list of friends.

    Comment by Shamrock - October 25, 2007 @ 11:51 AM
  2. Thank you! I have been waiting for a sidebar gadget for sometime that would monitor the status of my live friends. more than 5 players?

    Comment by Bryan - October 25, 2007 @ 12:34 PM
  3. Very nice. I, too, long for more than five players at the same time :) Perhaps just having the online players shown...

    Comment by Tom - October 25, 2007 @ 12:44 PM
  4. Major Nelson just pimped the bar. Prepare for comment onslaught.

    Fantastic work by the way.

    Comment by Rask - October 25, 2007 @ 12:47 PM
  5. Adam - thanks so much for working on this! Superb work!

    Comment by aceattorney - October 25, 2007 @ 12:48 PM
  6. I was wondering if this works on 64 bit of Vista?

    Comment by Jade - October 25, 2007 @ 1:00 PM
  7. AMAZING! Smoothest, most thorough gamertag gadget yet. Suggestions: Opacity control (does Silverlight prevent that?), longer/scrolling list, color customization! Keep up the great work!

    Comment by Sean - October 25, 2007 @ 1:00 PM
  8. This is cool...I am getting an error when I click on CPaladino right now:
    Line:160
    Error:'g_games.0.tileUrl' is null or not an object...

    Comment by Zapper - October 25, 2007 @ 1:05 PM
  9. Thank You!!!!!!! I have been waiting for someone to make a friends monitor sidebar gadget that actually works. Well done.

    Comment by Brady - October 25, 2007 @ 1:09 PM
  10. it looks like the error I was talking about is when people set themselves to hidden..or maybe when they are playing a game which does not have an official icon set yet.

    It also seems a little funky with displaying standard gamer icons. My first 3 friends were displaying icons...I added a 4th and it has never displayed his icon..and my first friend has lost his icon..

    Comment by Zapper - October 25, 2007 @ 1:25 PM
  11. Sorry for comment spamming, but longer list, background color options, update timing, rounded edges would be some suggestions

    Comment by Zapper - October 25, 2007 @ 1:28 PM
  12. Awesome, its great to hear that its useful.

    Showing more friends is the number feature for the next version. I'm planning on adding scrolling in the docked view and then a larger undocked view with scrolling. I like the other suggestions about opacity and custom colors, too.

    I will also do a better job of error handling. It looks CPaladino hasn't planned any games yet or is private, and right now I am expecting data. I'll work on that.

    Regarding 64-bit support, unfortunately it won't work. The Sidebar runs in a 64-bit context and Silverlight is not supported there yet.

    Thanks again for the compliments and the feedback.

    Comment by Adam Kinney - October 25, 2007 @ 1:28 PM
  13. I don't know if this is a bug or if I have something setup wrong, but I have one friend who has been online for the last hour. In the gadget window it says he's been off-line the entire time, however if I click on his name it says he's online playing Halo 3.

    Comment by Shamrock - October 25, 2007 @ 1:36 PM
  14. Is there a way to change how often it refreshes, it would be nice if it would do it every minute.

    Comment by Chad - October 25, 2007 @ 1:45 PM
  15. I installed Silverlight, but when I open the gadget in Vista, it only displays the "Get Microsoft Silverlight" button. If I click on it, it takes me to the download page.

    Suggestions?

    Comment by Thrawn ZA - October 25, 2007 @ 1:55 PM
  16. I get the same problem as Thrawn ZA, I think it's cause we're Vista x64 users. As Adam stated above, this gadget won't work on Vista x64 :(

    Comment by Parm - October 25, 2007 @ 1:59 PM
  17. Same here. Installed Silverlight and it still says "Get Microsoft Silverlight". Suggestions on how to fix this anyone?

    Comment by InstantKarmaUK - October 25, 2007 @ 1:59 PM
  18. Yup, Vista 64 here.

    Damn, this looks like a very, very useful gadget.

    Any future version that rectifies this would be hugely appreciated, Adam.

    Thanks beforehand!

    Comment by Thrawn ZA - October 25, 2007 @ 2:02 PM
  19. Nice gaget... waiting for this...
    BTW, i like how apple stock is down and microsoft is up, classic screenshot there :-)

    Comment by jay - October 25, 2007 @ 2:49 PM
  20. Can you check to see if you have a memory leak..or cause sidebar to go nutty?
    My memory requirements for Sidebar in task manager is growing about a meg a second. I have closed your gadget and it is still climbing....
    I have never run into this before..and your app is the only 1 i have touched today.

    Maybe a silverlight issue? My dual core is also pegged by sidebar.

    Comment by Zapper - October 25, 2007 @ 2:52 PM
  21. I am also running Vista 64 and this gadget is obviously incompatible. Please put out an update so that we can enjoy this gadget as well.

    Comment by John in NC - October 25, 2007 @ 2:55 PM
  22. Silverlight works fine and dandy on Vista 64.

    However it only supports 32-bit mode applications.
    If you want this to work in Vista 64 (until Silverlight fully supports the x64 applications workspace) just go to:

    C:\Program Files (x86)\Windows Sidebar\

    From there start the sidebar.exe program.

    Now you have a fully working version of the gadget, while running the 32-bit version of the sidebar. :)

    Problem half-way solved.

    Comment by Shane - October 25, 2007 @ 3:09 PM
  23. Oh one thing I forgot to add.

    If you want to make sure that the 32-bit version of sidebar always starts up it's pretty simple.

    From the System Tray right-click on the Sidebar icon and select Properties.

    Uncheck the "Start Sidebar when Windows starts" option, and close out of the window.

    Go to C:\Program Files (x86)\Windows Sidebar

    Drag and hold Sidebar.exe over the start orb.
    Drag and hold it over All Programs now.
    Now do the same over Startup. The folder should show as orange and then open up. Drop it in there.

    Rename it if you'd like.

    Now you can have the 32-bit sidebar and use this application in x64 Vista versions :)

    Comment by Shane - October 25, 2007 @ 3:16 PM
  24. Thanks Shane for the 64-bit workaround!

    Regarding memory issues, performance profiling and exception handling is on the list for the next update.

    Comment by Adam Kinney - October 25, 2007 @ 3:26 PM
  25. Looks like a nice gadget, just what I have been waiting for. However I can't get it to work. I've installed Siverlight 1.0, rebooted, reinstalled and it is still saying "Get Microsoft Silverlight".

    Any solutions yet?

    Comment by Simon - October 25, 2007 @ 3:57 PM
  26. Simon read my above post about Vista x64 and how to solve the issue :)


    Adam, one thing I've noticed one bug with that gadget. It's not huge, but I can see it being an annoyance.

    When I do the first fly-out after clicking on a friend I can hover and it will show their acheivements/GS per game.

    When I move onto the second/third/fourth/fifth friend it seems the fly-out loses focus.

    I can regain focus by clicking on the fly-out though.


    Can you tell I'm always in test mode? I have to find another hobby besides testing....maybe if I get hired on campus I'll find a different hobby for off-work hours. ;)

    Comment by Shane - October 25, 2007 @ 4:06 PM
  27. Shane, I'm not running Vista x64!

    Silverlight is installed and working in IE and Firefox according to the website.

    No luck as yet, any more suggestions?

    Comment by Simon - October 25, 2007 @ 4:19 PM
  28. Interesting.

    Have you tried uninstalling the Gadget, rebooting, and then reinstalling the Gadget?

    Comment by Shane - October 25, 2007 @ 4:21 PM
  29. Shane, I have tried that with no luck. Any one else managed to get Silverlight working yet?

    Comment by Simon - October 25, 2007 @ 5:57 PM
  30. Used the x86 Sidebar trick for Vista x64. Works great! Thanks Shane.

    Amazing little Gadget! Thanks Adam!

    Comment by Dean - October 25, 2007 @ 7:22 PM
  31. I still love the Gadget, but I think you need to work out some bugs. I noticed the gamertags I entered were all cleared out. When I tried to add them again the pop up where I added the names was all the way in the middle of my computer screen. Then my sidebar crashed and I got a checking for solution pop up. Told me windows side bar is not responding and I had to restart it. First time I've ever seen that. A few guys on IGN said the same thing happened to them.

    Comment by Shamrock - October 25, 2007 @ 9:23 PM
  32. I am having the same problems as #31. Very cool gadget. Work out the minor kinks and this is a winner!

    Comment by Tremor - October 25, 2007 @ 10:30 PM
  33. Nice gadget btw, just a little problem I'm having is that the gamer pictures don't seem to always work. They work at first but then go black.

    Cheers

    Raiydeck

    Comment by Raiydeck - October 25, 2007 @ 11:48 PM
  34. I love the gadget. Only thing that I would like added to the next build is either an ability to expand the viewable section of the gadget or to scroll to different gametags since I can't see all of the ones that I entered. Anyways, Thanks for the cool gadget.

    Comment by Neodiablo22 - October 26, 2007 @ 4:22 AM
  35. Great gadget, I've just fudged it so it'll show as many as you'd like here's how.

    goto the gadget folder (normally {user folder}/appdata/local/microsoft/windows sidebar/gadgets)

    Then in file Default.htm line 20 change the number to how tall you want your gadget.

    In file css/docked.css change the number in line 3 to the same number

    Last goto file xaml/SideBar.xaml and change the height in line 4 to the same number again, and on line 18 change the height to the number you've been using minus 2.

    Then add the gadget and you'll have a larger gadget!

    I've set mine to 551 and have 14 friend showing!

    Comment by Ashley Allen - October 26, 2007 @ 4:59 AM
  36. Still can't get the gadget working on Vista x86 with Silverlight 1.0 installed. Been snooping around in the source code and believe it is something to do with the Silverlight.js file. Trying to make sense of it is a little difficult, I believe it is trying to determine if Silverlight is installed and which browser is default.

    For those who are interested Silverlight.js location is, %User%/AppData/Local/Microsoft/Windows Sidebar/Gadgets/XboxFriendsWatch.gadget/js/

    Comment by Simon - October 26, 2007 @ 5:14 AM
  37. Appreciate the gadget. I think you may have a memory leak as sidebar was up at half a gig of memory. However really useful, thanks.

    Comment by Declan - October 26, 2007 @ 5:23 AM
  38. Anyone know how to uninstall Silverlight, theres no uninstaller by the looks of it, and just deleting the installation folder doesn't do the trick. Thinking I need to find keys in the registry, but would prefer an uninstaller!

    Comment by Simon - October 26, 2007 @ 5:29 AM
  39. Carefull - This seems to have a spretty serious memory leak - I've seen it kill 2 computers this morning. Caused sidebar to use over half a gig of memory.

    A shame, because this was looking lovely. I'm sure it's something simple.

    Comment by Mr Andi - October 26, 2007 @ 6:57 AM
  40. Quite a few bugs in this. Runtime errors when the user doesn't exist, when the user doesn't have enough games to fill the icon slots, icons stopped showing up for all users, and this morning I came back on to like 6 runtime errors from just sitting there and all my memory was being used by the program. It's not uninstalled.

    Comment by Billy Two Fingers - October 26, 2007 @ 7:40 AM
  41. Thanks guys for hanging in there. For performance there is plenty to do too to improve that. This code was originally written as a proof of concept but now that there is a fair bit of interest, I don't want that to go to waste. I'll work an update and test it a bit this weekend. Look for a new version on Monday

    Comment by Adam Kinney - October 26, 2007 @ 7:55 AM
  42. Anyone know if a stand alone application that does the same sort of thing exists please?

    Comment by Chris - October 26, 2007 @ 8:05 AM
  43. i installed silverlight then the program but it still says on the sidebar get microsoft silverlight. so wtf? i have vista premium 64 bit by the way.

    Comment by Andrew - October 26, 2007 @ 8:21 AM
  44. Its awesome!!!
    now we want a zune gadget which can show our zune cards from Zune Marketplace!!!!

    Comment by Taimur Asad - October 26, 2007 @ 8:32 AM
  45. Silverlight download is down for some reason can it be downloaded from anywhere else?

    Comment by John - October 26, 2007 @ 11:04 AM
  46. Very nice gadget, there are a few changes/improvements I'd like to suggest.

    -Pull in your friends list from your XBL friends list, rather than having to add them manually.
    -Allow more than five friends on the list. Scroll them, and sort the active to the top.
    -Enable the launching of messanger/xbox webpage to chat with them should one come in.

    Comment by lymem - October 26, 2007 @ 1:56 PM
  47. I am not sure what the best solution for aquiring names from Friends list would be...entering manually sucks...but realistically you would only be able to follow 10 or so without constantly scrolling up and down.

    I think deleting 90 would be more hassle than adding 10..

    Maybe have a way to select them from a list or something.

    Comment by Zapper - October 26, 2007 @ 2:50 PM
  48. Great gadget, but how often does it update?
    It tells me a friend is offline, but when I click them in the expanded view it tells me theyre online. Can you increase the refresh rate, as its not very good for just glanceing at it this way.

    Comment by mike - October 27, 2007 @ 5:07 AM
  49. Very cool except found a minor bug. My Sidebar is on the left hand side of the screen and this gadget hangs off of the sidebar area (try it yourself) It appears the settings tab is about 10 pixels away from the actual gadget. Works perfectly ont he default right side of the screen though. Please check on this because other than that: This thing freaking rocks!

    Comment by Netrat33 - October 27, 2007 @ 10:22 AM
  50. I tried this under Vista 32-bit and it worked great, but I notice via taskmanager that after about 2 hours it was using 400mb of RAM! I only had 3 people on my list! Bug perhaps?

    Comment by Bob - October 28, 2007 @ 12:05 PM
  51. Is it possible to send messages to your friends true the gadget???

    Comment by slider2nl - October 29, 2007 @ 6:34 AM
  52. I too, have noticed the gadget hanging off the sidebar when the sidebar is docked to the left-hand edge of the screen...it's just enough to be visually disturbing. Great work otherwise...hope to see this minor issue fixed.

    Comment by Paul - October 29, 2007 @ 12:03 PM
  53. Vista Ultimate x86

    Installed Silverlight first.
    Installed the gadget.

    Still won't work. I only get the "Get Microsoft Silverlight" icon in its place. Uninstalling/reinstalling doesn't work either.

    My default browser is Firefox...is that it?

    Suggestions?

    Comment by Ted - October 29, 2007 @ 9:00 PM
  54. Nice gadget, had to employ the 'hotfix' to run it in Vista 64-bit. I must say it's pretty poor that Silverlight isn't supported in the native 64-bit Vista sidebar, I mean, they're both Microsoft products so why isn't it supported in the flagship operating system? Surely 64-bit is the way forward? We should be slowly phasing out the 32-bit operating systems!

    One request, to be able to set the opacity would be nice, as well as room for more than 5 friends. Thanks for a cool gadget though! =)

    Comment by Benny Hannah - October 31, 2007 @ 2:06 PM
  55. When my computer returns from hibernation, the gadget will not update the status of my friends. If I delete it and install it again, it starts working until the next hibernation.

    Comment by Magnus Logi - October 31, 2007 @ 3:00 PM
  56. any timeline for next release?

    Comment by Bryan - November 01, 2007 @ 1:18 PM
  57. @ #55:

    I'm having the same problem. You don't need to reinstall the gadget, just close the Sidebar (right-click on its Systme Tray icon and choose Exit) and then run it again from the Start menu. That worked for me anyway.

    Comment by B - November 01, 2007 @ 5:28 PM
  58. I know everyone likes the gadget and it's use but the thing I see here that is huge is the use of silverlight in the sidebar. Dude! I never liked the old model and never thought the sidebar would be worth anything but this would change everything. Nice work too btw!

    Comment by Juan Stevens - November 02, 2007 @ 6:07 AM
  59. Hey everyone, I just thought I'd let you know I've released a new version. This one is focused performance improvements as well as the addition of version checker.  That way you won't have to keep coming back to this page to get the next release.

    I'll be adding some FAQs on the Gadget page, but I can start here and move them later.

    Refresh Rate
    I've set the gadget to refresh every 10 minutes based on the fact that data from the service is cached every 10 minutes.  I am thinking about adding a manual refresh button to act as a placebo/test functionality button.

    Left Aligned Sidebar positioning offset
    Yeah, that's bad, I hadn't tried that yet.  That should be an easy fix in the next version.

    @53 Ted
    You may have an older version of SIlverlight that isn't updating for some reason.  I would suggest uninstalling and then reinstalling. More info here.

    @55 Magnus
    Reloading the data when the gadget restarts should work.  It could be that it doesn't have access to the Internet at that point.  I don't have any form of retrying the initial data load.  You should be able to fix it by going into settings and closing settings.

    @58 Juan
    Thanks Juan!  That's what I'm talking about :)

    Comment by Adam Kinney - November 02, 2007 @ 8:45 AM
  60. Adam, I had a similar problem with timers and hibernation/sleep resuming. The fix for me was relatively simple, which you can read here -- http://everythingandnothing.spaces.live.com/blog/cns!759F0B3484575700!249.entry

    I'm not sure how that will work for you if you're doing timers inside of Silverlight rather than in the gadget javascript code, though.

    Comment by Todd - November 04, 2007 @ 1:42 PM
  61. Adam - It appears that the gadget only shows people "online" if they are active. If they are away, they appear as "offline". Anyway to fix this?

    Comment by Brian - November 06, 2007 @ 3:43 PM
  62. I see no settings icon on the right side. I don't know why.

    Comment by TeeRiese - November 09, 2007 @ 6:33 PM
  63. Awesome gadget !

    There is a free PC software working like a messenger at : http://www.xblfriends.com/index.php?lang=en

    Comment by sorcer1 - November 15, 2007 @ 3:43 AM
  64. I love this app! It's one of the coolest items in my sidebar. I know there are still lots of things to work out and make better, but I ran into a snag today. I was playing Call of Duty 4 and of course it showed up in the gadget perfectly. I then switched to Assassin's Creed, but it still showed that I was playing COD4. Then after I had been logged off for a while, it still showed me playing COD4. The only way I could get rid of it was to restart the gadget. Hope the input helps. I'm definitely looking forward to any new features!

    Comment by j sizzl - November 16, 2007 @ 5:59 PM
  65. Excellent gadget!

    My thoughts are in line with most others here - scrolling would be a natural upgrade. Everything else seems to work like a charm.

    Thanks for your hard work!

    Comment by Prime - November 25, 2007 @ 2:45 PM
  66. Minor annoyance, but when Windows Sidebar is on the left hand edge of the screen, there is a larger space between the toolbar for the Friends Watch gadget and the gadget, causing the main display to be off center from the rest of the gadgets.

    Great gadget, I love it.

    Comment by Ryan Snook - December 13, 2007 @ 11:36 PM
  67. And of course, this has been reported several times. Bad me for not seeing that you acknowledge it previously.

    Comment by Ryan Snook - December 13, 2007 @ 11:38 PM
  68. I'm down with the resizing comment made earlier.. If the gadget would auto-resize, or if there was a scroll bar, it would be perfect as a passive gadget.

    My number one feature request is to be able to send messages to the user from the flyout.

    Comment by chris - December 18, 2007 @ 5:48 PM
  69. I also see no settings icon on the right side. Is this a permissions problem?

    Comment by Andrew - January 04, 2008 @ 9:31 AM
  70. Hi there - a quick suggestion which may have been made before (sorry) - is it possible to have the friends that are currently 'doing something' jump to the top of the list?

    Comment by Matt - January 17, 2008 @ 3:14 AM
  71. Please can you support more than 5 friends? Even just 8??? :)

    Comment by Matt - January 21, 2008 @ 12:37 PM
  72. Just a quick note to say, after the delay, I am back on the gadget. I just reviewed the comments and I have 23 bugs/feature suggestions to work through. :) Expect an update soon.

    Comment by Adam Kinney - January 23, 2008 @ 12:21 AM
  73. Great gadget, I've been using it for a while now. I just installed Silverlight 2 Beta 1 in order to take a look at the Blend 2 March 2008 Refresh and the gadget no longer displays anything. It doesn't even have a Settings icon anymore. I guess this is due to the beta?

    Comment by Tony - March 07, 2008 @ 10:59 PM
  74. Hey. Your gadget is great, thanks. There is a bug. When a friend has played fewer number of unique games than the number of "past game" slots in the expanded window that opens after clicking on a friend I get a runtime error:
    "A runtime Error has occurred. Do you wish to Debug?"

    "Line:1
    Error. `this.games.1.tileUrl` is null or not an object"

    This error is thrown everytime the friend is clicked. Very annoying because I have many friends who only play one or two games on their 360. Hopefully this is an easy bug to fix. Thanks for you efforts.

    Comment by Matt W - March 10, 2008 @ 8:49 PM
  75. Hello - I just wanted to say you are welcome to upload the Vista gadgets on our site http://www.gadgetsdownload.com , we try collect a lot of good once. another a great site here for gadgets build beginners thanks

    Comment by movie - April 27, 2008 @ 4:27 PM
  76. oh and it took me a few web pages to find its a VISTA gadget...is there one for XP with MCentre Edition?

    Comment by skidz - May 13, 2008 @ 1:49 PM
  77. erqwerqwerqwerwerwerqwerqwerqwerqwerqwer

    Comment by guitarplayer338 - May 18, 2008 @ 5:43 AM

Leave a comment