DesignMode Property for WPF

27 February 2007

A very useful property for visual elements that you wanted to use in a designer in Visual Studio in Winform development was the DesignMode property of Component. That allowed you to make conditional code that wouldn't have the proper context to run in a design mode environment.

It is not immediately obvious how to do that in WPF, because it doesn't show up in the intellisense where you would expect it. But, it is still there. It is a little less convenient, but no worries. A check would look something like this:

bool foo = System.ComponentModel.DesignerProperties.GetIsInDesignMode(this);

That boolean value would indicate whether or not you were in design mode. A lot more verbose, but still workable. 

Comments:0

Code Thought of the Day

27 February 2007

Last week the guest on DotNetRocks was Steve McConnell, author of Code Complete. I had read about 2/3 of the first edition and liked it, so I wanted to get the new edition and read it. My team lead was nice enough to buy it for me and expense it, so I am reading it now. Here's a thought that is often so true. Many businesses Every business I've worked at since my foray into full-time software development could learn from this:

"In many projects, the only documentation available to programmers is the code itself. Requirements specifications and design documents can go out of date, but the source code is always up to date. Consequently, it's imperative that the source code be of the highest possible quality."

Alas, will the world ever learn? Surely some of you have been somewhere that doesn't have this problem :) 

Comments:0

Me At Refresh Dallas

25 February 2007

Any of you web geeks out there been to Refresh Dallas? Me either. I'm going to check it out tomorrow night. If you're going, drop me a note.

Comments:0

New Ending for the Gospel of Mark? Apparently Not.

24 February 2007

There have been some rumors floating around that a new ending for the gospel of Mark has been found. As it turns out, that was a case of inaccuracy in journalism. Read the scoop on the front page of CSNTM. There is even a retraction by the scholars themselves that had supposedly made the discovery.

Comments:0

Crispy and Wheaty

22 February 2007

I was in the drive through at Crispy Creme the other day and noticed that they now have whole wheat donuts. Does this strike anybody else as ironic, odd, or at least slightly off?

Comments:2

Book Review of theWPFblog

21 February 2007

theWPFblog had some good things to say about a book that I just finished reading. I pretty much concur. I'll have my own review on it up soon.

Comments:0

My New Super Big Monitor

14 February 2007

I got my first bonus at Match, so I decided to get something that I've been wanting for some time...an uber monitor.

 

 And there it is. It is the 24 inch 2407FPW Flatpanel monitor. In a word, magnificamazingafantasticatistic. I now have quite a bit more screen real estate. It may be hard to tell, but on the screen I have both Visual Studio and Expression Blend open at the same time...that's really nice.

This also gives me more room on the desk, which is nice. A feature I wasn't expecting was that the base swivels, so I can change the orientation of the monitor. A nice feature when viewing some pictures.

Anyway, happy valentines day to me!

Comments:0

Taking the WPF Dive

13 February 2007

So I finally started looking into WPF. I finally had a project that could use it. I've spent the last week and three days spending just about all my spare time reading and coding this stuff.

First impression...wow. Over the last few months I have been spending time in ASP.NET Ajax and have been very impressed, and I still am. But this...this just blows me out of the water. Seriously, as I do things, I keep saying "wow" to myself. I also found myself frequently bugging my personal winforms gui guru David just to say "wow" to him.

It is going to have quite the learning curve with most who have experience in winform development. That has been the case for me. It's not that it is very hard; it is just very different.

More thoughts later, for sure. The project that involves WPF will go on for quite some time. I will be able to tell you more about the specific project sometime in March, I expect. Stay tuned.

Until then, if you do any windows development, check it out. It rocks. And while you are at it, check out Expression Blend. Very useful.

Comments:2