Welcome to Pete Brown's 10rem.net

First time here? If you are a developer or are interested in Microsoft tools and technology, please consider subscribing to the latest posts.

You may also be interested in my blog archives, the articles section, or some of my lab projects such as the C64 emulator written in Silverlight.

(hide this)

Monthly Archives: February 2010

  • Windows Client Developer Roundup for 2/22/2010

    This is Windows Client Developer roundup #12. I’ve just returned from the MVP summit and some meetings with the product teams, and all I can say is “wow”. We have some seriously cool stuff coming, and I can’t wait to talk about it. The Windows Client Developer Roundup aggregates information of interest to Windows Client Developers, including WPF, Surface, Windows 7, XNA, Windows Forms, Silver...

  • Getting Started with WPF : Button Control Part 2 – Basic Styling

    In my previous post about buttons and content controls, I explained how to do quite a bit of customization using just the content property of a button. That gets you pretty far, but you’re barely tapping into what WPF (and Silverlight) can do. In this post, we’ll cover styling and and build up the background we’ll need to tackle templating, the backbone of what makes WPF and Silverlight so pow...

  • WPF Tip: Identifying WPF Applications

    Often on twitter I see posts like “I just downloaded X, it looks awesome. Is it WPF?” One way to easily answer that question for yourself is to download snoop and run it. If you hit refresh and the application shows up, it’s a WPF app. If not, well, it’s not :)   Here’s Snoop’s 3d view working on Visual Studio 2010 Beta 2

  • Windows Client Developer Roundup for 2/15/2010

    This is Windows Client Developer roundup #11. The Windows Client Developer Roundup aggregates information of interest to Windows Client Developers, including WPF, Surface, Windows 7, XNA, Windows Forms, and some Silverlight. If you have something interesting you’ve done or have run across, please send me the URL and brief description via the contact link on my blog. This week I’m on campus in...

  • Snoop, Now even better, thanks to the Community

    Once upon a time, Pete Blois at Microsoft created the awesome WPF utility Snoop. Snoop is an indispensable utility for inspecting and debugging WPF applications. It’s also just cool to play with. Snoop is a small toolbar that sits up in the corner of Windows, waiting for WPF applications to show up. When you select one, you can then “snoop” around to see what’s in there. For example, here’...

  • Announcing: touch.codeplex.com - Multi-touch for Silverlight 3/4 and WPF 3.5sp1

    Marc Schweigert in public sector just announced the availability of touch.codeplex.com, a set of multi-touch behaviors for WPF 3.5sp1, Silverlight 3 and Silverlight 4.Project OverviewThe APIs in WPF4 plus the Surface Toolkit for Windows Touch make building common touch scenarios easy. However, implementing many of the same touch scenarios using WPF3.5SP1 or Silverlight 3/4 involves writing a fa...

  • Announcing: The WPF Feature Feedback and Voting Site

    I like getting WPF feedback from the community. I talk to customers, look at blogs, scan forums, and have standing searches set up on Twitter. The feedback I get is great, but it's not structured or contained in all one location.We’re now in the early planning stages for WPF v.next. Following some of the great work folks like Tim Heuer have done in making the Silverlight planning proc...

  • The Book of WPF

    Ever wonder what types of applications people are building in WPF? It can be hard to just stumble across them as they are typically products, or applications behind firewalls. Luckily, we now have the Book of WPF. The Book is a nicely produced PDF with screen shots and information about each of the apps being showcased. You’ll find all sorts of applications in there from LOB to CAD to Digi...

  • 24 Hour 50% off Deal on my Upcoming Manning Book: Silverlight in Action, Revised Edition

    On Wednesday February 10, 2010 my book is on sale at Manning for 50% off.That’s print, MEAP, e-book or any combination of the bunch. This is a special thanks for blog subscribers and twitter followers.To get the discount, visit my book page on Manning, choose the eBook or print book. When you’re ready to check out, enter the code:silver50nowin the coupon code box. The coupon is good...

  • Tip: New .NET 4 String Function to Check for Empty Strings

    How many times have you written code similar to this? string firstName = FirstName.Text.Trim(); if (!string.IsNullOrEmpty(firstName)) { // do something } or if (someParam == null || string.IsNullOrEmpty(someParam.Trim()) throw new ArgumentException("Empty string", "someParam"); // do something A nice little time-saver for those guard functions is ...

  • Getting Started with WPF : Hello World in multiple flavors

    So you’re brand spanking new to WPF. You have to start somewhere, so how about good old “Hello World”.ToolingFirst, some tooling. If you are in a situation where you can use Beta or RC products, download Microsoft Visual Studio 2010 RC. I’m still using the Beta, as the RC came out today and doesn’t yet support Silverlight 4.If you can’t use a Beta or RC, use ...

  • Windows Client Developer Roundup for 2/8/2010

    This is Windows Client Developer roundup #10. The Windows Client Developer Roundup aggregates information of interest to Windows Client Developers, including WPF, Surface, Windows 7, XNA, Windows Forms, and some Silverlight. If you have something interesting you’ve done or have run across, please send me the URL and brief description via the contact link on my blog. WPF Windows 7 Sensor T...

  • Creating Customized UserControls (Deriving from ContentControl) in WPF 4

    Another twitter question. As usual, I'm targeting WPF 4 here, but just about everything here works with Silverlight 4 as well. (read from bottom up) Let's say you want to create a standardized "gadget" for your application, from which anyone can derive and create their own gadgets. The desire: Provide a base gadget that has some sort of standardized chrome and some beha...

  • WPF Quick Tip: How to Restrict Window Size in WPF 4

    Another (paraphrased) question from twitter “How do I set the minimum and maximum sizes for my window in WPF”. The poster wanted to know how to constrain the size of their WPF window to a set minimum height/width and maximum height/width. I originally replied with a complex answer referring back to my WPF Resize Behavior, because I completely forgot about the simple supported approach: <Wi...

  • Upcoming Deal on my Silverlight 4 Book for Blog Subscribers

    If you subscribe to my blog (you’re here, and it’s easy, just do it .. dooo itttt ;) click the RSS link above) there’s a Manning deal on my book coming next week. It’ll only be around for one day (Manning sets the terms, not me) and it is a really good deal.If you haven’t checked it out yet, I encourage you to do so. Some chapters are already available to peop...

  • Getting Started with WPF 4: Button Controls Part 1 – The Button is a Content Control

    I have an ongoing twitter search for topics of interest to me and my position at Microsoft, so anything with words like "windows forms", wpf, windowsclient.net etc. all show up in my search. Thought that, I often find folks who are struggling with how to get started in WPF. I've been meaning to do some beginning WPF tutorials for a bit. Since the main focus of my job is to help peopl...

  • Silverlight Quick Tip: Controlling the Out-of-Browser Window

    If your Silverlight 4 application is running with Elevated Permissions, you can control a fair number of aspects of the hosting out-of-browser window. You can change the size, location, make it top most, set window state and Activate it. Here’s some simple example code: if (Application.Current.HasElevatedPermissions) { Window win = Application.Current.MainWindow; win.WindowState =...

  • Moving a WPF Window with Custom Chrome

    Robert Iagar on twitter asked how to move a window in WPF without using the built-in title bar or resorting to user32.dll, so I whipped up this quick sample. So let’s have at it:Window XamlWe’ll create a simple window with no built-in border or titlebar. We’ll use a border, some shapes and a HeaderedContentControl to provide stand-in titlebar/content areas.<Window x:Class=&...

  • Back from Best of Tech-Ed/Convergence Reykjavik, Iceland

    Last week I had the real pleasure of speaking at the Best of Tech-Ed and Convergence in Reykjavik, Iceland. I was absolutely amazed by the size of the developer and IT community in Iceland, and the turnout at this conference. For an island of about 300,000 people, having a turnout close to 1,200 locals at a conference is pretty amazing. The participants at the conference were all great folks. ...

  • Windows Client Developer Roundup for 2/1/2010

    This is Windows Client Developer roundup #9. I’ve returned from a great time in Iceland. Awesome community and incredible place to visit. One item of note: If you want to see the WCF RIA Services source code shipped with the product, be sure to vote in this poll. New blog from the WPF/Silverlight designer team. Check it out. The Windows Client Developer Roundup aggregates information of int...