Destination .NET! Platform Tools, Technologies & Resources
1 3 5 7 9
2 4 6 8 10
From VB4, C++ and Java to working on .Net Since Beta, 1.0.
Improving partner satisfaction and accelerating Microsoft platform adoption for managed ISVs.
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 >>
What product/topic are you most interested in?
(Choose your top answer.)
Windows Vista
Windows Server 2008
2007 Microsoft Office system
SQL Server 2008
ASP.NET
Visual Studio 2008
Windows Mobile
Software as a Service
A little bit of everything
Just browsing, thanks

View Results
Whether you love the site or hate it, we want to know. Tell us what topics to cover, help us improve things, or just sound off on something we could've done better. Send your feedback directly to the editor by email.
 Print Print
Average Rating: 5/5 | Rate this item | 1 user has rated this item.
Building the DevX Destination.NET Windows® Sidebar Gadget (cont'd)
More Resources
  • Watch the Video Walkthrough
  • Download the Gadget Files
  • Read the Sidebar: Developing a Windows Sidebar Gadget in Windows XP
  • Windows Vista Service Pack 1 Developer Training
  • Microsoft Visual Studio 2008 Web Seminar Series for ISV Developers
  • ISV Web Seminar: Windows Vista Certification Workshop Series
  • 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
    Justin Whitney is a regular contributor to DevX.com and Jupitermedia. He currently lives in San Francisco, where he consults for leading high-tech firms and writes about emerging technologies.
    Previous Page: JavaScript Walkthrough #2: Setting  
    Page 1: Architectural OverviewPage 5: JavaScript Walkthrough #1: Gadget
    Page 2: Architectural Overview continuedPage 6: JavaScript Walkthrough #2: Setting
    Page 3: Architecting the RSS ReaderPage 7: Deployment, Wrap-up, Lessons Learned
    Page 4: Special Considerations for CSS 
    Submit article to:
    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. >>
    Sign up for your free e-mail newsletters today!
    DevX Windows Developer Update

    More Newsletters
    .NET Building Blocks: Custom User Control Fundamentals
    Quickly Copy Data Rows from DataReader to a DataTable
    Introduction to the WPF Command Framework
    Taming Trees: Building Branching Structures
    Implement Drag and Drop in Your Windows Forms Applications



    JupiterOnlineMedia

    internet.com earthweb.com Devx.com mediabistro.com Graphics.com

    Search:

    Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

    Jupitermedia Corporate Info

    Copyright 2008 Jupitermedia Corporation All Rights Reserved.
    Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

    Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers