Welcome to WindowsClient.net | Sign in | Join

Rob Relyea - XAMLified

WPF, Silverlight and Xaml

Software should not contain a Window title of "Window1"!

One of my pet peeves is that many WPF projects I see have a window Title of "Window1" like this:

image

Please pick a title that is descriptive of your application. 

In WPF, you can change your title by:

  1. Select the Window object in the designer, find "title" in the property grid, and give it a good value; or
  2. Open Window1.xaml and replace the value of the Title property on the Window element at the root.
Published Monday, August 18, 2008 5:03 PM by Rob_Relyea
Filed under:

Comments

# re: Software should not contain a Window title of "Window1"!@ Monday, August 18, 2008 10:23 PM

I'm guilty as charged! =X

I know where you are coming from.  I have a similar peeve with Winforms/VB6 apps that leave the form's maximize button enabled and/or the borders resizable when they shouldn't be.  And of course I always resize the window to see if there's any hidden goodies...but alas, none!

-Jer

# re: Software should not contain a Window title of "Window1"!@ Tuesday, August 19, 2008 2:13 AM

Hi Rob,

I would say that the same goes for the titlebar/app icon, which should be changed ASAP in an app development process.

This kind of things should also be considered as FxCop rules :)

by andrejt

# re: Software should not contain a Window title of "Window1"!@ Tuesday, August 19, 2008 9:22 AM

You can't make it an FxCop rule when Devstudio itself wasn't willing to apply the project name to the default window or form. Build yourself an MFC wizard app and execute it. Notice the title of the main wnd?

I think it's part of the .NET mentality. With MFC there's much more stitching holding the generated main window and application together. Whereas in a Forms or WPF app it's really just a suggestion; a convenient set of starting classes that aren't really bound together into an application.

There is no wizard to speak of so it's an incredibly generic project template. And unfortunately, I think people who didn't learn to program until after C# was introduced haven't been 'trained' to pay attention to little details like that.

All that aside, yes, of course you should rename the thing. Personally I'm of the opinion that any traditional "main window" type application, regardless of which tech you used to build it, should display the name of the app in the titlebar.

# Usability Tip: Put Something Meaningful in Your Window Titles@ Thursday, August 21, 2008 11:58 AM

Leave a Comment

(required) 
(required) 
(optional)
(required) 
Page view counter