Tuesday, May 29, 2007

Caution: Surface is very hot

http://www.microsoft.com/surface/

Let us talk about hotness. Holy hotness.

I've never jumped up and down and laughed out loud more than when when I got to play with Surface.

Scary-beyond-words cool stuff.

I've been delighted to help the team with a few tweaks to WPF core controls to ensure they play nicely on Surface. It's a great showcase of the power of our platform (and a number of other MS graphics technologies.)

Actually, very few tweaks were needed to WPF to support their scenarios. Dwayne and friends did an amazing job designing an extensible input system. Mouse, keyboard and stylus were on the initial list of possible devices. Finger and drink glass just happened to plug in nicely.

Here's to brilliant layering, huh?

20 Steps to happiness

(This silliness assumes you haven't jumped into the beauty that is WPF development. It also assumes you're running Vista. If you aren't, why not? If you have a good reason, I'm betting you'll get help installing .NET Framework 3.0. on XPSP2)

  1. Go here
  2. Click on Visual C#
  3. Login with your Windows Live ID
  4. Download and click on all of the nessesary buttons
  5. Marvel at the small (~30 MB) download (if you don't get the data stuff).
  6. Type "Visual" in Vista's start menu.
  7. Marvel at the cool search feature
  8. Pick Microsoft Visual C# 9.0 Express Edition
  9. Marvel at our crazy long product names
  10. Pick "New Project..." from the start menu. (Ctrl+Shift+N to be super fast)
  11. Pick WPF Application.
  12. Marvel at the visual designer for WPF. (Thanks Cider team.)
  13. Open up the Toolbox and find the ListBox under Common Controls.
  14. Draw out a ListBox on the Window.
  15. Marvel at the XAML updating right away.
  16. Notice the auto-generated name for your ListBox: listBox1.
  17. Open up Window1.xaml.cs
  18. Paste the following below InitializeCompontent();

    var foo = from a in Directory.GetDirectories(@"C:\") select new{a, a.Length};
    listBox1.ItemsSource = foo.ToList();
  19. Marvel at:
    -the use of "var" -- mmm...implicit types
    -from/select in C# -- mmm...Linq goodness
    -new {a, a.Length} -- mmm...anonymous types
    .ToList() -- mmm...extension methods
  20. Hit F5

WPF Goodness + VS "Orcas" design-time Goodness + Linq goodness = happiness

mmm...

     

     

Friday, May 25, 2007

My Mix Session is finally live

Well, it's been live for a while, but I was in Iowa last week.

XD009 - WPF For Developers

As I said before, the code for all of the demos is in the bag-o-tricks.

Happy hacking!

Wednesday, May 2, 2007

Kevin's Bag-O-Tricks - MIX07 Edition

For those that came to my talk, thanks! Please fill out an evaluation so I know what you liked.

For everyone, as promised, here's the updated bag-o-tricks.

Drop me an email if you have questions/comments/bugs/suggestions.