InstallAware for Windows Installer
 

Building Aero Glass Dialogs

Most setup dialogs automatically transition between Aero, Basic (both available beginning with Windows Vista), Themed (available beginning with Windows XP) and Classic (available beginning with Windows XP) Windows user interfaces, rendering correctly on all four automatically. If your dialog does not contain a VistaGlass control, your dialog will work perfectly and no additional effort is required on your part.

However, if you are using the VistaGlass control, and you have enabled Glass regions, then additional effort on your part may be necessary to ensure your dialog supports all four Windows themes - taking advantage of advanced features such as Desktop Composition where available (rendering some or all of the dialog on Glass), but still looking good on older Windows versions where composition may be unavailable.

When developing dialogs with Glass regions, always be sure to test on all four Windows themes:

  • Aero: With translucent Glass regions (works on Windows Vista or newer).
  • Basic: With "fake" Glass regions that look different from the rest of the dialog, but are not translucent (works on Windows Vista or newer).
  • Themed: Without Glass regions, but with support for themed rendering of dialog controls (works on Windows XP or newer).
  • Classic: Without Glass regions, and without theming for controls (works on Windows XP or newer).

Best Practices

You may use the pre-defined variable $GLASS$ to determine if the Aero or Basic theme is active, and adjust the visibility of your dialog controls accordingly.

This way, you may build dialogs that look different (and at their best) based on whether Glass regions (even if only "fake") are visible or not, which is the most major consideration when building dialogs that leverage the Aero user interface.

Emulating the Aero Wizard Design

You may also design your dialogs such that no duplicate controls are needed. InstallAware strives to maintain your freedom in designing dialogs with as little manual overhead as possible, while allowing you full use of your creativity and still being standards-compliant.

This is made easier since InstallAware automatically updates some dialog elements for universal Windows theme compatibility. An important standard introduced with the Aero user interface is the Aero Wizard, for which InstallAware provides extensive support.

InstallAware assumes that you are trying to build an Aero Wizard compliant dialog if:

  • The VistaGlass control GlassEnabled property is True
  • The dialog has its BorderStyle property set to bsSingle
  • The VistaGlass control GlassTop property is larger than 0
  • If all of the above conditions are valid, then InstallAware will automatically make the following runtime changes for universal theme compatibility and for maintaining full design parity with the Aero Wizard look on all Windows themes, as has been implemented in Microsoft's own Aero Wizards.

    When the Basic Theme is Active

    • The BorderStyle property of the dialog will be changed at runtime to bsSizeable. Dialog re-sizing will be prevented programmatically. The dialog will be grown slightly to account for the new larger borders while keeping the client area the same. The new border style matches the style used by Aero Wizard dialogs with the Basic theme.
    • A Shape control will be created at runtime, displaying a single line at the ending of the "fake" Glass top region. This matches the color used by Aero Wizard dialogs with the Basic theme.

    When Windows is Older Than Windows Vista, or the Classic Theme is Active

    • If the dialog has its Color property set to clWhite (the color of Aero Wizard dialog backgrounds under the Aero or Basic themes), the Color property will be set to clBtnFace at runtime (the color of Aero Wizard dialog backgrounds under Themed or Classic themes).
    • A Shape control will be created at runtime, displaying a single line at the ending of the Glass top region, but in a different color than for the Basic theme.

    The intention behind all these changes is to exactly mirror how Aero Wizard windows are rendered by Windows when Aero itself disabled but one of the Basic, Themed, or Classic themes are active.

    Additional Compatibility Heuristics

    InstallAware also provides additional theme compatibility heuristics, which are useful not only in Aero Wizard design but helpful with Glass design overall.

    When the Aero Theme or Basic Theme is Active

    • If the VistaGlass control GlassEnabled property is True; and the VistaGlass control GlassTop property is larger than 0, or the VistaGlass control SheetOfGlass property is True, then the dialog caption and icon will not be rendered on the form caption.

    When the Basic Theme is Active

    • If the VistaGlass control GlassEnabled property is True, all Glass regions on the dialog will be rendered as "fake" Glass regions (regions of alternate color on the form).

    When Windows is Older Than Windows Vista, or the Classic Theme is Active

    • If the GlowLabel control Glow property is True, because the glow effect is unavailable under the themes in question, the label will be rendered in Bold typeface instead.

    All Themes

    • If the VistaGlass control GlassEnabled property is True, the dialog may be moved directly by dragging on the Glass regions, in addition to the default behavior of moving the dialog by dragging the dialog title bar.

    Preferred Dialog Controls

    The dialog editor now displays a new Glass tab on the component palette.

    • Where possible, use controls from this tab as these controls have been designed from the ground up to work well on Glass.
    • If your desired control is not available on this tab, then check the other tabs.
    • Do not use a control from one of the other tabs when a substitute is already available on the Glass tab.