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)

If you take a look inside one of these folders, you'll usually see a language folder, like "en-US", and an "images" folder. While it's important to adhere to language conventions, you have latitude with the existence and naming of both of these folders. For example, your source code will reference image files by location. In fact, in some Gadgets you'll see images dumped into the root of the Gadget folder, while others may have more extensive organization.

In the language folder you'll find the one file all Gadgets require, the Gadget manifest: gadget.xml. This manifest names your primary Gadget file, such as "main.html". This primary file in turn names any flyout and setting files you may have. Here's what the DevX gadget manifest looks like:
 <?xml version="1.0" encoding="utf-8" ?>
<gadget>
  <name>DevX Destination.NET RSS Gadget</name>
  <namespace>DevX.Gadgets</namespace>
  <version>1.0</version>
  <author name="Justin Whitney">
    <logo src="images/destnetlogo.jpg" />
    <info url="http://www.devx.com/MicrosoftISV/Door/6421?trk=MSdestdotNET" 
    text="Destination.NET" />
  </author>
  <copyright>
    Copyright© 2007
  </copyright>
  <description>Features, Live Events, Webcasts, Downloads, and more from 
    DevX Destination.NET</description>
  <icons>
    <icon width="64" height="64" src="images/destneticon.jpg" />
  </icons>
  <hosts>
    <host name="sidebar">
      <base type="HTML" apiVersion="1.0.0" src="main.html" />
      <permissions>Full</permissions>
      <platform minPlatformVersion="1.0" />
      <defaultImage src="images/dragicon.jpg"/>
    </host>
  </hosts>
</gadget>

"Flyouts" literally fly out from the side of the Gadget based on an event in the Gadget, giving users additional information or functionality. You can use a single HTML file for flyouts or swap out between multiple files, though only one can be displayed at a time. "Settings" appear when users click the Settings button on the side of your Gadget. While intended to give users access to variables at the application scope, you can also use it to display "About…" information or non-"setting" functionality. Both flyouts and settings are optional and will only appear if you've coded for them.

So at the bare minimum, a Gadget will include one folder, the .gadget folder itself, and two files: your Gadget manifest, specifically named "gadget.xml", and your Gadget source, referenced within the manifest. MSDN has a great walkthrough on building a basic Hello, World Gadget. It also touches on accessing System information and taking advantage of Gadget-specific elements, though I won't get into either of those here.

Page 2 of 7
Previous Page: Architectural Overview Next Page: Architecting the RSS Reader
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