Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Windows 7 For Developers

2,145 views

Published on

This presentation provides some outline for developers to build cool applications by utilyzing some great features available in windows 7.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Windows 7 For Developers

  1. 1. Windows 7 for Developers<br />Mohammad Ashraful Alam<br />Microsoft MVP 2007 - 2009<br />[ www.ashraful.net ]<br />
  2. 2. Agenda<br />
  3. 3. Agenda<br />Introduction<br />Taskbar<br />Windows Ribbon<br />Multitouch<br />Sensors and Location<br />More..<br />Resources and References<br />
  4. 4. Common System Requirements<br />Windows 7<br />Visual Studio 2008 SP1/ Visual Studio 2010 Beta 2 (or higher)<br />Windows 7 SDK<br />Windows API Code Pack for the .NET Framework<br />Windows 7 Multitouch .NET Interop Sample Library<br />
  5. 5. Windows7 API CodePack for .NET<br />.NET Wrapper for Windows 7® features<br />Taskbar, <br />Libraries<br />Sensor<br />Location<br />Multi-Touch<br />UAC<br />power management<br />restart and recovery<br />network awareness, Aero Glass and more. <br />
  6. 6. Taskbar<br />
  7. 7. Windows 7 Taskbar<br />Taskbar Buttons<br />Jump Lists <br />Thumbnail Preview<br />Thumbnail Toolbars <br />Custom Switchers<br />Icons<br />Overlay Icons<br />Progress Bars<br />
  8. 8. Taskbar Buttons<br />Quick launch<br />User friendly<br />Running application windows<br />Multiple windows<br />Active<br />Running<br />Not running<br />
  9. 9. Jump Lists<br />Pinned category<br />Destinations<br />(“nouns”)<br />Known categories<br />Custom categories<br />User Tasks<br />Tasks<br />(“verbs”)<br />Taskbar Tasks<br />
  10. 10. Thumbnail Preview<br />
  11. 11. Thumbnail Toolbars<br />
  12. 12. Taskbar Overlay<br />Surface important notifications<br />Appears over your taskbar button<br />
  13. 13. Taskbar Overlay IconsCode Snippets<br />WinForms: TaskbarManager.SetOverlayIcon(IntPtrwindowHandle, System.Drawing.Icon icon, string accessibilityText)<br />WPF: TaskbarManager.SetOverlayIcon (System.Windows.Window window, System.Drawing.Icon icon, string accessibilityText)<br />
  14. 14. Taskbar Progress bar<br />Shows progress status<br />Appears over your taskbar button<br />
  15. 15. Taskbar Progress BarCode Snippets<br />WinForms: TaskbarManager.SetProgressState(TaskbarProgressBarState state, IntPtrwindowHandle)<br />WPF: TaskbarManager.SetProgressState(TaskbarProgressBarState state, System.Windows.Window window)<br />
  16. 16. Windows Ribbon<br />
  17. 17. Windows Ribbon<br />Application Menu<br />Help<br />Contextual Tab Set<br />Tab<br />Quick Access Toolbar<br />Contextual Tab<br /><ul><li>In-box with Windows 7, redistribution available to Vista
  18. 18. Win32 API,
  19. 19. Feature parity (or close) with Microsoft Office 2007 Ribbon, and WPF Ribbon</li></ul>Dialog Launcher<br />Group (aka “Chunk”)<br />
  20. 20. Combo Boxes<br />Windows Ribbon - Controls<br />Spinners<br />Mini Toolbar &Contextual Menu<br />Group Dialog Launchers<br />Buttons & Split Buttons<br />Color Pickers<br />Tooltips<br />Categorized Menus<br />Font Control<br />“In-Ribbon” Galleries<br />Dropdown Galleries<br />Tabs & Groups<br />Check Boxes<br />
  21. 21. Windows Ribbon API Interfaces<br /><ul><li>Consists of these main interfaces</li></ul>IUIFramework – initialize ribbon, load markup resource, get or set command property values or state, set application modes<br />IUIApplication– user-implemented interface. Retrieves user command handler for each command defined in the markup. Notifies about view state changes<br />IUICommandHandler – user-implemented interface. Handles commands, updates property value (for example, setting a command to enabled or disabled based on view)<br />
  22. 22. Integrating Windows Ribbon<br />Application<br />Ribbon Platform<br />CoCreateInstance<br />IUIApplication<br />Initialize (HWND, IUIApplication*)<br />LoadUI( resourceName )<br />OnCreateCommand<br />IUIFramework<br />Execute, UpdateProperty<br />IUICommandHandler<br />Get/SetUICommandProperty, InvalidateUICommand<br />
  23. 23. Multitouch<br />
  24. 24. Multi-Touch Is Here!<br /><ul><li>Hardware
  25. 25. Multi-touch enabled hardware device
  26. 26. Software
  27. 27. Windows 7, .NET Framework 4.0
  28. 28. Consumers
  29. 29. New scenarios, next wave of user
  30. 30. experience, high “WOW” factor</li></li></ul><li>Multi-Touch Is Scenarios<br />We’ve identified several key scenarios for multi-touch:<br /><ul><li>Navigating and consuming the web
  31. 31. Reading & sorting email
  32. 32. Viewing photos
  33. 33. Playing casual games
  34. 34. Consuming music and video
  35. 35. Navigating files & arranging windows
  36. 36. Using Office applications</li></li></ul><li>Multi-Touch Development TiersGood – Better – Best<br />Windows application can target one of three levels of touch integration<br />Good: No specific touch APIs are used but the application UI is appropriately sized and works well with the built-in gestures<br />Better: The gesture APIs are supported to give smooth natural interactions<br />Best: Deep touch-focused experiences designed to take advantage of multi-touch features<br />
  37. 37.
  38. 38. Call To Action<br /><ul><li>Decide the appropriate scenario that fits with concept of multi-touch feature
  39. 39. Decide which tier of investment is appropriate
  40. 40. Check your current applications
  41. 41. Add
  42. 42. Gesture
  43. 43. Or manipulation
  44. 44. Or inertia
  45. 45. Build something amazing!</li></li></ul><li>Sensors and Location<br />
  46. 46. Few Real World Usage<br />In a sunny day, an application might increase brightness, contrast etc<br />An application might provide location-specific information, such as nearby restaurants <br />An application might use a human presence sensor to change the state of the Messenger status <br />
  47. 47. Sensor Platform Overview<br />Windows 7 features a new API for working with sensors<br />COM-based API<br />Works with drivers using the sensor class extension<br />You can seamlessly interact with any type of sensor, such as<br />Ambient light sensor<br />Temperature gauge<br />GPS device etc<br />
  48. 48. Location Platform Overview<br />The Location API lets you obtain the location without caring about the particular mechanism used to obtain the information, for example, <br />GPS<br />cell-tower or <br />Wi-Fi hotspot triangulation. <br />The Location API automatically chooses the most accurate sensor data available. <br />
  49. 49. Sensor and Location API: Benefits<br />Hardware-independence: No need to target vendor-specific APIs or to know hardware specifics<br />Application sharing: Multiple applications can consume data from the same sensor simultaneously<br />
  50. 50. Privacy<br /><ul><li>Privacy: Because Microsoft recognizes that sensor and location data are private, personally identifying information, all sensors are disabled by default.</li></li></ul><li>Sensor and Location Platform Architecture – The Big Picture<br />Gadget or script<br />Application<br />Application<br />Location API<br />Location IDispatch Interface<br />Sensor API<br />Location and Other Sensors Control Panel<br />User<br />System<br />Sensor class extension<br />Sensor class extension<br />UMDF sensor driver<br />UMDF sensor driver<br />Logical location sensor<br />(Triangulation)<br />Sensor<br />device<br />
  51. 51. Sensor Wrapper Architecture<br />Sensor is an abstract base class with a derived type for each sensor type<br />Derived types can add properties and events<br />
  52. 52. Receiving Data Reports from Sensor<br />a3dSensor.DataUpdated += OnDataUpdated;<br />void OnDataUpdated(Sensor sensor, SensorDataReport<br />dataReport)<br />{<br /> Accelerometer3DReport a3dReport=<br />(Accelerometer3DReport)dataReport;<br />Console.WriteLine(&quot;X: {0} Y: {1} Z: {2}&quot;,<br /> a3dReport.AxisX_G, a3dReport.AxisY_G, <br /> a3dReport.AxisZ_G); <br />}<br />
  53. 53. More ..<br />
  54. 54. More ..<br />High DPI<br />Version Checking<br />Instrumentation and Performance<br />Background Services<br />Shell Libraries<br />
  55. 55. Reference and Resources<br />Training Materials<br />Channel 9 Windows 7 Online Training: http://3.ly/Win7Tr<br />Windows 7 Training Kit For Developers: http://3.ly/Win7TK<br />Software Materials<br />Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1: http://3.ly/win7SDK<br />Windows® API Code Pack for Microsoft® .NET Framework: http://3.ly/Win7CP<br />Windows 7 Multitouch .NET Interop Sample Library: http://3.ly/Win7Touch<br />
  56. 56. Contact<br />Mohammad Ashraful Alam<br />Web: www.ashraful.net<br />Blog: http://blog.ashraful.net<br />Email: admin [a-t] ashraful.net<br />Twitter: http://twitter.com/AshrafulAlam<br />
  57. 57. Thank You!<br />

×