Aaron Brethorst

Round peg in a square hole, rabid generalist.

Consistent Dialog Non-Client Areas With Winforms

| Comments

Even though it receives far less attention than it’s more-malleable sibling, the non-client area of a dialog (the window frame, etc.) is highly configurable with Winforms 2.0. There are several guidelines that you should follow when creating new dialogs in order to ensure that your application’s non-client area meets the Windows Ux Guidelines.

By default, you should use the following settings for your window’s frame:

  1. MaximizeBox = false
  2. MinimizeBox = false
  3. ShowIcon = false – Dialog boxes must never have an icon in their top-left corner.
  4. ShowInTaskbar = false – Dialog boxes must never be shown in the task bar.
  5. FormBorderStyle = Sizable or FixedDialog – Make sure that dialog resizing works as expected when enabling this.
  6. SizeGripStyle = Show or Hide – Make sure that the resize handle is always visible when the FormBorderStyle is set to Sizable, or never shown when set to FixedDialog.

When naming your dialog, there are a few simple guidelines to follow:

  1. Dialog title is concise; describes intent succinctly.
  2. First letter of each word is capitalized.
  3. Never use periods, colons, semicolons, commas or other punctuation in a dialog title, except for proper names.

Examples:

  1. “Options”
  2. “About MyCompany Software”
  3. “Select Resource”

Anti-Examples:

  1. “Choose a file to open:” – Lacks proper capitalization, too wordy, and includes a colon.
  2. “OPEN FILE…” – Lacks proper capitalization, and includes three periods.
  3. A proper titlebar

Comments