Home > Articles > Home & Office Computing > Microsoft Windows Vista & Home Server

An Approach to Windows Vista Gadget Design

Rajesh Lal introduces design considerations, UI challenges, and visual themes to consider when creating gadgets for Windows Vista.
This chapter is from the book
  • "You know you've achieved perfection in design, not when you have nothing more to add, but when you have nothing more to take away."
  • —Antoine de Saint-Exupery

In This Chapter

  • Design Considerations
  • Challenges for the User Interface
  • Visual Themes
  • Transparent Images in the Gadget

Design Considerations

This chapter is about gadget design and user interface. Design starts with the factors that determine the type of gadget you want to develop, the information it will display, the user interface, the usage pattern, and the behavior of a gadget.

Design includes the dimensions, the images, the text, and the "look and feel." You also decide how the gadget interacts with the user and how it interacts with the system. This chapter discusses the visual theme, how the gadget can look like a part of Windows Vista, and the overall user experience.

Before you start, keep these two things in mind:

  • Justify the space—The Windows Vista Sidebar is neither very tall nor wide. It can have—at the most—five or six gadgets at any particular time. Thousands of other gadgets, freely available online, will compete for the same screen space. So, offering the set of features a user critically needs is an important factor. Be prepared to convince users that your gadget justifies the space.
  • Ensure overall quality—If your users don't experience quality throughout your gadget, they may conclude there is a lack of quality everywhere. This means you need to pay attention to the quality of icons, images, text, background, and interaction. Each of these elements is equally important. A good idea and a great implementation with an average user interface cannot stand up to the competition (see Figure 3.1).
Figure 3.1

Figure 3.1 Two gadgets that perform the same function, one with a nice interface and the other plain and simple. Which one would you prefer?

Consider the following four factors before designing a gadget (see Figure 3.2):

  • Information first
  • The right user interface
  • The gadget's usage pattern
  • The gadget's behavior
Figure 3.2

Figure 3.2 A gadget's design is an important aspect of development.

Putting Information First

Gadgets are meant for a single task. When designing a gadget, keep in mind that a gadget should have a small set of goals relevant to the specific task. A gadget should show only data suitable for that task and that task only. Information in the gadget window should satisfy the following rules:

  • Live data
  • Information for quick access
  • User's choice
  • Brief information for further action

Let's take a closer look at what each of these really means.

Live Data

Gadgets should display only information that changes regularly, such as live feeds, news updates, daily weather, battery status, and so on. Information that is static for more than a day makes a gadget dull.

A user looks to a gadget to see interesting things that are active. Fun gadgets are an exception but can be made more interesting if live data is also added. For example, a subset of a popular game is nice to have in a Sidebar, but it's better if there is live information, like a regularly updated scoreboard, or live updates about the game. If that is not possible, adding a capability to change the gadget's wallpaper (background image) is a good option.

Easy Access to Information

Gadgets are particularly useful at showing information for which users don't have to start an application or open a web page. A good example might be stock values, an event calendar, traffic maps, local fuel cost, and so forth. Any information that saves a user's time makes a gadget worth the space it takes.

Information Relevant to Individual Users

Gadgets are all about user choice and preference. If there are a lot of users for a particular newspaper's crossword puzzle, a gadget that taps into that theme can be an instant hit with them. User-tailored gadgets are very popular, such as a gadget for a Flickr website showing the user's own shared pictures or the user's favorite blog feed.

Information for Further Action

The gadget should show enough information for the user to decide on further action. For example, a website statistics gadget should not show each and every detail corresponding to website usage. It should show statistics for a week or a day and let users decide what further action they want to take.

Case Study: The Soapbox Video Gadget

Imagine you wanted to create a video gadget (see Figure 3.3). The task is to create a gadget for a video feed from http://soapbox.msn.com with the goal of accomplishing the following:

  • Listing frequently updated videos from soapbox.msn.com in a simple and aesthetically pleasing way
  • Playing a video in the flyout
Figure 3.3

Figure 3.3 This fully developed gadget gives quick access to Soapbox video.

A video feed normally contains thumbnails of the video, reviews, and ratings from users. A gadget with these goals gives you the following options for design decision:

  • Making available the thumbnails and ratings for each video
  • Adding capability to browse video by categories
  • Functionality to search for videos by keyword
  • Video resize option with support for Windows Media Player and Flash Player
  • Easy page-wise access to list of videos

Figure 3.3 shows a preview of the Soapbox Video Gadget with all these options. More information about the gadget can be found at http://www.codeproject.com/KB/gadgets/SoapBoxGadget.aspx.

Try to make your gadget feature-rich by providing a complete set of functionality related to a specific task (see Figure 3.4). Think like a user. If the gadget shows a list of videos, the gadget should also categorize them and give easy access to all the items in the video feed.

Figure 3.4

Figure 3.4 This gadget is able to categorize MSN Soapbox videos, giving users easy access to the one they want to see.

Providing the complete set of functionality does not mean that the gadget should do everything the Soapbox video website is doing. Video sharing and review capabilities in the website may not be a part of the gadget. Complete functionality here means the gadget should give access to all the information from the video feed, which is the gadget's input. The users should be able to filter videos, sort them, search by keyword, and play videos in the way they want. In Chapter 11 we will see how to create a video gadget using YouTube Video feedback.

Refer to the checklist of guidelines for gadget development and compare that to this gadget. What live information does the gadget display?

  • Frequently updated soapbox feed.
  • Currently featured videos.
  • Recent videos.

Does the gadget offer quick access to the information it provides?

  • Ability to click on the thumbnail to play the video in the flyout.
  • Ability to browse through the video list.

Does the gadget give the user a choice?

  • Settings page gives an option to customize the list of videos.
  • Users can select the media player and video size.

Does the gadget provide information that lets the user decide on further action?

  • Gadget gives information about the video's ratings, a thumbnail image, and the title in the main window for users to decide to watch the video.
  • Gadget gives Previous and Next options for browsing the videos in the feed.

Constructing the Right User Interface

Gadgets are a visual experience and the right user interface makes all the difference. Here are four pointers for creating one:

  • Keep the gadget simple and aesthetically pleasing.
  • Show only relevant information.
  • Make use of visuals such as icons and images, rather than text.
  • Be sure that the gadget is not too obtrusive.

Simplicity and Aesthetics

A gadget should look simple and aesthetically pleasing. Take a look at the gadget samples provided in Figure 3.5.

Figure 3.5

Figure 3.5 Choice of clear image and aesthetically pleasing fonts can make a lot of difference in gadget design.

Clearly the objects in the first pair are both simpler and more aesthetically pleasing than the obnoxious clock and difficult-to-read note. If a gadget is going to be part of the desktop, it is something the user will look at every day; make sure it is as clear and aesthetic. The choice of color and fonts can also make a difference.

Show Only Relevant Information

The maximum width of a gadget is 130 pixels. That's not a lot of room to work with, especially if there's a lot of information you want to convey. It can be done, however. Just look at the RSS feed and Calendar Gadgets shown in Figure 3.6.

Figure 3.6

Figure 3.6 The RSS feed Gadget shows the title partially in the gadget window, and the complete title is shown as the tooltip.

So, what is it exactly that makes these well-designed gadgets? For one, titles should generally be only as long as the space allows. With some gadgets, like this RSS news feeder, that isn't possible. But in this case, tooltips are applied to good effect. And, although you can't see this clearly from the black-and-white photos in this book, the fonts have different colors to highlight the title.

The RSS Reader Gadget doesn't try to do too much. It displays only four records at a time, and the Calendar Gadget displays just the current month or the current day, based on the user's choice.

Figure 3.7 shows two more gadgets that are designed to accomplish the same goals, but suffer from an extremely poor design.

Figure 3.7

Figure 3.7 The gadget with scrollbars and the overfilled calendar both try to squeeze too much information into the small space.

The presence of a scrollbar in a gadget is unacceptable. It's far better to use paging because a scrollbar can further reduce the already small space a gadget provides. Providing paging functionality to browse multiple items with previous and next options and page numbers can remove the clutter from the gadget screen. Both the Blog and the Calendar Gadgets have far too much information cramped into a small space. That's the kind of design mistakes you should strive to avoid when designing your own gadgets.

Make Use of Visuals

Make use of icons, images, and signs as much as possible; they give visual clues of the functionality (see Figure 3.8). For example, a Weather Gadget can use pictures of clouds, the sun, and rain instead of corresponding text to depict different weather condition. The proper use of images makes the gadget more user friendly.

Figure 3.8

Figure 3.8 Pictures of clouds and sun in the Weather Gadget depict the weather. Computer usage in the form of a CPU meter is more intuitive than plain text.

Two gadgets are compared in Figure 3.8. Both gadgets show the same information, using different designs. However, the designs in the top row have visuals that give a rich experience to the user. When designing a gadget, check for the following:

  • Can any information displayed in the gadget can be replaced by visuals?
  • Is the gadget too plain or does it lack design?

Visual themes are covered in more detail in later section.

Not Too Obtrusive

The design of the gadget should not be too obtrusive. The use of buttons and user controls should be avoided at all costs. For example, using a Previous and Next button can make the gadget look ugly. Instead, use proper images and show them when the mouse is moved over the gadget.

Figure 3.9 compares a Picture Slideshow Gadget with two different designs. The lower gadget shows buttons to browse either the previous image or the next one. The buttons are too obtrusive for a good design. The upper images are examples of a good design. The gadget's default view (upper left) is without any Previous or Next buttons. When the mouse is moved over the gadget, previous and next images are shown.

Figure 3.9

Figure 3.9 The always visible Previous and Next buttons are used to browse images in the Picture Slideshow Gadget (lower image), but they are too obtrusive for the small space.

The Picture Slideshow Gadget shows the action buttons (images) on mouse hover. A good mouseover effect (refer to the upper-right image of Figure 3.9) with proper visuals makes a good design. Note that these are not buttons but images that are aligned with the gadget theme.

Usage Patterns

The type of gadget you want to create also has an impact on its design. As discussed previously, there are four broad classifications:

  • Information gadget
  • Application gadget
  • Utility gadget
  • Fun gadget

These classifications all have common user interface guidelines, but each has its own specific design pattern that needs to be considered during development.

Information Gadget

Information gadgets collect data from multiple sources and are time sensitive. An information gadget normally uses RSS feeds that contain 10 or more items. To display them all in the gadget proper, page number and previous/next options should be available. The use of such options is also referred to as paging. These gadgets refresh their data regularly, so they should not be visually distracting or obtrusive (see Figure 3.10). As stated previously, there should be no scrollbars.

Figure 3.10

Figure 3.10 This example of an RSS Reader Gadget has paging options 1–4 and no distracting images. It reflects good gadget design.

Application Gadget

These gadgets depend on other applications or products for their data and act as a side product or a quick tool for data visualization. These gadgets should be designed with the main product or application in mind. The visual theme should go along with the original application (see Figure 3.11).

Figure 3.11

Figure 3.11 An application gadget mimics the user interface of the original application.

This is an example of a Microsoft Office Recent Documents gadget. The gadget shows the recently used Microsoft Office documents. The corresponding logo of Microsoft Office and icons for Microsoft Word, Excel, and PowerPoint make the gadget look rich and pleasing.

Utility Gadget

Utility gadgets provide quick information or shortcuts to frequently accessed tools and features. There should be no gimmicks in a utility gadget. The size should be appropriate: It should be the smallest of all other types of gadgets and should correspond to the feature it provides (see Figure 3.12).

Figure 3.12

Figure 3.12 A Battery Monitor Gadget displays percentage and time remaining in appropriate size.

This example shows a utility gadget that indicates the amount of battery life remaining in a mobile PC. The information it provides is the percentage of battery remaining and the time left. The background is an image of a battery with a percentage filled with color. This is a good design. There are no bells and whistles, but the size is appropriate and the design is intuitive.

Fun Gadgets

Fun gadgets are more distracting than other types of gadgets. As a result, users are likely to change them more frequently. Their purpose is to entertain or provide some fun activity to the user. If you are making a fun gadget, you must have a strong understanding of your target users and the gadget should have some dynamic features to keep the user interested for a longer period of time. It should also look visually pleasing (see Figure 3.13).

Figure 3.13

Figure 3.13 This Minesweeper Gadget has a visually pleasing interface.

A visually pleasing experience comes with proper use of colors along with neat and clean images. Keep these quick tips in mind:

  • Do not use too many colors; try to stick with two or three colors.
  • Do not use more than one bright color in your gadget window.
  • Check for good contrast colors or shades of the same color.

The example shown here is of a Minesweeper Gadget. It uses only a few colors: gray, black and red. It makes good use of contrast between red and black and the color also reflects the personality of the game.

What Gadgets Are Not Meant For

So far we have discussed what the different usage patterns are and what a gadget is meant for. This section gives you an idea what a gadget is not meant for. Keep this set of rules in mind while designing a gadget:

  • Gadgets are not meant as a substitute for full applications such as email or instant messaging.
  • Gadgets should not be designed as time-sensitive applications.
  • Gadgets should contain no direct advertisements.

A gadget is not meant for notification purposes. Notice of new emails or instant messages should not be a gadget's purpose. Applications such as instant messaging and email notification require more robust applications such as MSN Messenger and Microsoft Outlook. A gadget is lightweight and is designed to supplement these applications rather than compete with them.

A gadget is also not meant for notification applications that need immediate attention because gadgets are not executables running in the user's desktop. They reside in the Sidebar and the user might have closed or hidden the Sidebar to avoid distraction. A gadget should not be a crucial application.

Gadgets can be used for advertisement purposes but are not meant to include banner advertisements or text ads. The small size of gadgets does not allow them. Check the next chapter to get details on the gadget's business model.

Gadget Behavior

The behavior relates to the way the gadget interacts with the user. How a gadget should react in particular circumstances, what a gadget is meant for, and what it is not meant for—all this decides the gadget's behavior.

You need to consider the following to ensure proper gadget behavior:

  • Gadget configuration
  • Refreshing a gadget
  • Errors, information, and warnings
  • Service not available information

Gadget Configuration

Most gadgets have an optional settings page that can be used to configure the gadget. You access it by clicking on the Option menu in the right-click context menu or by clicking the settings icon in the top-right corner of the gadget (see Figure 3.14).

Figure 3.14

Figure 3.14 A settings page of a Weather Gadget enables the user to select a location, as well as choose Fahrenheit or Celsius to display temperature.

Gadget configuration is the only option a user has to customize the gadget. It is a single administration page per instance of the gadget. Any configuration change in the settings page is applied to only that instance of the gadget. Choose wisely what changes a user would like to have in the gadget, based on its functionality. For example, if the gadget allows, give a resize option to a mini version of the gadget with absolute essentials. This gives the user the opportunity to add more gadgets to the Sidebar, which means that your gadget has a better chance of being utilized.

A settings page gives the user an option to customize the gadget according to choice. A configuration page gives more flexibility and freedom to the user and so increases a gadget's usability.

Refreshing a Gadget

If your gadget displays live data, you might need to refresh it regularly or on user demand. Keep in mind that if a user has a slow Internet connection, it can take some time for a gadget to reload. Using a loading image in the waiting screen with the message Getting data... or loading... is recommended (see Figures 3.15).

Figure 3.15

Figure 3.15 A Weather Gadget displays a Getting Data screen, along with a Vista busy cursor (image on the left) to display the status.

Errors, Information, and Warnings

The gadget sometimes needs to display status to the user. For example, an RSS Feed Gadget needs to tell the user when the feed is not available, or if there is no Internet connection available to fetch data from the remote server. These messages can also be custom error messages, warnings, or other information. All these status messages should be shown as inline text with standard 16×16 icons, like the ones shown in Figure 3.16, for the type of message. Pop-up dialog boxes are not allowed in a gadget.

Figure 3.16

Figure 3.16 Standard icons for errors, information, and warnings need to be used for the corresponding status.

A gadget is an HTML file with scripts, so make sure you have handled all the possible errors in the gadget. If there is an unexpected error or warning, display it in the same way as the Getting Data screen shown in Figure 3.15, or display the Service Not Available screen. If the error inside a gadget is not handled properly, a default runtime error message is displayed along with the line number.

JavaScript error messages, like the one shown in Figure 3.17, are annoying. One of these messages and the user will lose all faith in the gadget and won't hesitate to remove or even uninstall it. A good practice is to encapsulate each JavaScript function inside an error handler, a try-catch block.

Figure 3.17

Figure 3.17 Typical JavaScript error messages, like this one, are too vague to be useful to the end user.

A try-catch block is a piece of code that ensures the execution of the catch block if any error occurs inside the try block. Here is the example in JavaScript. The code ensures that the user doesn't get a default JavaScript error dialog:

  // your script code here
 catch (e)
   //set and display your inline error message and icon here

Service Not Available Information

Service Not Available is a default screen that is used in most of the common scenarios. Use the Service Not Available screen where appropriate. For example, if the gadget is in a mobile laptop and the laptop disconnects from the Internet, show a screen with the information icon like the one shown in Figure 3.18.

Figure 3.18

Figure 3.18 A Weather Gadget shows a Service Not Available screen when there is no Internet connection, along with the information icon.

Sample code would look like this:

If (CheckInternetConnection)
  // your functionality code here
   //set and display your inline "Service not available" message and icon here

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information

To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.


Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.


If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information

Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.


This site is not directed to children under the age of 13.


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information

If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information

Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents

California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure

Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact

Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice

We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020