Download presentation
Presentation is loading. Please wait.
1
Developing Windows Vista gadgets iSDC Workshop, November 9 th 2007. Mark Blomsma Software architect Develop-One
2
Agenda Introduction Objectives Basic development cycle Demo Progamming gadgets Settings and gadgets Security Demo 08-nov-2007© 2007 Develop-One2
3
Mark Blomsma Professional developer since 1992 Microsoft Certified Professional (MCP) Microsoft Most Valuable Professional (MVP) for four years running Author, Speaker & Software Architect at Develop-One Instructor for DevelopMentor 08-nov-2007© 2007 Develop-One3
4
Objectives Know how to develop a gadget Basics Settings page Know how to deploy a gadget 08-nov-2007© 2007 Develop-One4
5
Basic development cycle Create an HTML page Create gadget manifest (XML) Zip files & Rename to.gadget Install Test Loop: Close, Fix, Install & Test 08-nov-2007© 2007 Develop-One5
6
Gadget HTML design Sidebar is 130px wide Minimum height for a gadget is 57px This is the height of the button panel 08-nov-2007© 2007 Develop-One6
7
Gadget Tags Additional HTML tags g:background g:image g:text 08-nov-2007© 2007 Develop-One7
8
gadget.xml 08-nov-2007© 2007 Develop-One8 XDriveInfo DevelopOne.Windows.Vista.Gadgets 1.1.0.0 © 2007, Develop-One XDriveInfo display the amount of free space available on your AOL XDrive. Full
9
Installation Double click a.gadget file Installed in: c:\users\ \appdata\microsoft\windows sidebar\gadgets 08-nov-2007© 2007 Develop-One9
10
Demo Build an ‘Hello World!’ gadget. 08-nov-2007© 2007 Develop-One10
11
Quiz What is the correct filename for the gadget manifest: A.gadget.manifest B.gadget.xml C.gadget.zip 08-nov-2007© 2007 Develop-One11
12
Programming HTML JavaScript ‘alert(..)’ is disabled DHTML CSS Images ActiveX controls Silverlight Adobe Flash (not on x64) Gadget Object Model 08-nov-2007© 2007 Develop-One12
13
Gadget Object Model Events Dock, Undock Settings Functionality System.Debug System.Diagnostics System.Environment System.Gadget Presentation g:background g:image g:text 08-nov-2007© 2007 Develop-One13
14
Settings 08-nov-2007© 2007 Develop-One14 // wire up the settings page System.Gadget.settingsUI = "settings.html"; // hook into closing event System.Gadget.onSettingsClosing = settingsClosing; // write a setting System.Gadget.Settings.write(“name", _name); // read a setting _name = System.Gadget.Settings.read(“name");
15
Settings.ini Gadget settings are stored in: c:\users\ \appdata\microsoft\windows sidebar\settings.ini Warning: Gadget settings are not encrypted Gadget setting ARE accessible from other gadgets using ActiveX. 08-nov-2007© 2007 Develop-One15
16
Security All gadgets sit on the local machine and run in ‘Full trust’ User Account Control interaction Local Machine Zone security configuration Group policies Turn off Windows Sidebar Disable unpacking and installation of unsigned gadgets Turn off user installed gadgets Override ‘More Gadgets’-link 08-nov-2007© 2007 Develop-One16
17
Demo Add a settings page. Use ActiveX to read the settings.ini file. 08-nov-2007© 2007 Develop-One17
18
Signing gadgets 08-nov-2007© 2007 Develop-One18
19
Gadget Resources http://microsoftgadgets.com/build/ http://microsoftgadgets.com/build/ http://blogs.msdn.com/sidebar/ http://blogs.msdn.com/sidebar/ http://msdn2.microsoft.com/en-us/library/aa965853.aspx http://msdn2.microsoft.com/en-us/library/aa965853.aspx http://msdn2.microsoft.com/en-us/library/bb498012.aspx http://msdn2.microsoft.com/en-us/library/bb498012.aspx http://blogs.msdn.com/sidebar/archive/2006/08/31/733880.aspx http://blogs.msdn.com/sidebar/archive/2006/08/31/733880.aspx http://www.pantaray.com/signcode.html http://www.pantaray.com/signcode.html http://blog.develop-one.com http://blog.develop-one.com 08-nov-2007© 2007 Develop-One19
20
08-nov-2007© 2007 Develop-One20 mark.blomsma@develop-one.com www.develop-one.com http://blog.develop-one.com
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.