|
|
 |
Is your application compatible with Windows Vista? Make sure today by taking our self-test. Just follow the five steps of the Works with Windows Vista program so that you and your customers can be confident in your solution’s compatibility. Read More
>>
|
|
|
|
Building the DevX Destination.NET Windows® Sidebar Gadget (cont'd) |
|
Deploying the Gadget
At this point, the Gadget is complete. To deploy it, all I had to do was compress the EN-US and images folders together into DevXGadget.zip. Then I renamed .zip to .gadget and posted it. When the user is ready to deploy the gadget, they simply have to download DevXGadget.gadget (and make sure it still has a .gadget extension) then double-click the file to install it. After some security prompts, the Gadget appears in the Sidebar's Gadget Gallery, where it can be double-clicked or dragged onto the Sidebar to put it into use.
Wrap-up and Lessons Learned
As you can see, you already have the basic skills necessary to build Windows Vista Sidebar Gadgets. How long it takes depends on how complicated you make it and how much fine-tuning you do. One glaring difference between Gadgets and other types of applications is the size of the UI. Though flyouts can pretty much be as big as you want, the Gadgets themselves take up a very small amount of real estate. This means a little extra attention should be paid to the UI, including graphic assets and efficient use of space.
In building this Gadget, I came away with a few lessons learned:
- During development, it helps to build as much of the Gadget as possible using a browser and HTML editor, without using System.Gadget. This allows for more debugging flexibility. I found that debugging a Gadget in the Sidebar can be a tedious and frustrating experience due to limited feedback opportunities.
- That said, Gadgets offer a fundamentally different flow of control. So I learned to keep code segments in discreet chunks so they can be broken apart and rearranged more easily, once the Gadget moves to the Sidebar environment.
- Always define height and width for the Gadget body. A silly mistake, but that one got me.
- Make liberal use of
System.Gadget.Flyout.show = false; to make sure the flyout recedes appropriately. You'd be surprised how often it sticks out there after control has been passed.
- Also make liberal use of
System.Gadget.Settings.read and System.Gadget.Settings.write for state management, as well as various events included in the API, such as System.Gadget.onSettingsClosing and System.Gadget.onSettingsClosed.
- Most of all, if you must run Windows Vista and Windows XP on the same machine, go ahead and make that partition. But for the love of Claire, don't run any Windows Vista updates until the project is finished! [See Sidebar: Developing a Windows Sidebar Gadget in Windows XP.]
My Gadget Bookmarks
Here are some resources I found particularly helpful during the creation of the gadget.
* This article was commissioned by and prepared for Microsoft Corporation. This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY.
Page 7 of 7
|
|
|
|
|
|
|
|
 |
|
 |
Extending your solution to run on Microsoft technology is easier than ever. Through NXT, you can reach more customers, increase revenues and slash development time and costs, accelerating both your time to market and profitability. Get the details on NTX.
>>
|
|
|
|
|