INDEX

Numbers Theme animations, 273, 274–275 Theme transitions, 273–274 3-D rotating panel, 284–285 using, 277–280 3-D-like transformations, 283–285 animations dependent, 272 independent, 272 A API Layer, 64 (application programming interfaces) a element (HTML), 172 Background Transfer, 502 accelerometer, 30, 442–448 history, 9–19 Accelerometer class, 442–448 Location, 435–441 AccelerometerReading object, 443–444 Sensor Fusion, 456–459 AccessDeniedException, 476 Syndication API, 416–419 Accuracy property, 434 APM (Asynchronous Programming Model), 135 ActiveX, 471 app bar, 331–332 AddDeleteThemeTransition, 274 adding to screen, 332–335 addEventListener function, 194 navigation and, 369–372 AddNote method, 411 missing app bar, 372–375 advertisements in Windows Store, 547 responding to events, 335–336 Altitude property, 434 AppBar control, 309 AltitudeAccuracy property, 434 AppBarBackgroundThemeBrush, 250 ambient light sensor, 30, 455–456 appendLinesAsync method, 190 AMP (Accelerated Massive Parallelism), 486– appendTextAsync method, 190 489 application data stores, 343 animation application development, 19–20 ColorAnimation, 280 asynchronous platform, 131–132 custom, 280–281 style applications, 122 DoubleAnimation, 280 creating, 129–131 Expression Blend for Visual Studio 2012, design language, 122–123 111–115 general design principles, 123–124 ObjectAnimation, 281 pages, 125–127 SimpleRectanglesCOPYRIGHTED MATERIAL project, 109–111 application resources, 249 storyboards, 274–276 ApplicationData class, 343–346 transformations, 281–282 applications 3D space, 283–285 background tasks, 42 center point, 282–283 browsing for, 34–39 multiple, 283 contracts, 400 UI (user interface) and, 18 Search, 402–407 visual states, 276–280 Share Target, 407–411 Windows 8 Animation , 222–227 Declarations tab, 401 Animation Library, 272–273 desktop, layers, 64–65 storyboards, 274–276

577

012680bindex.indd 577 8/26/12 2:55 PM applications – asynchronous programming

applications (continued) trial mode, 548–550 Direct2D, 479 trial versions, 544–545 , 479 uploading, 543 installed AppLifeCycleDemo, 318 browsing for, 34–39 app.onactivated function, 159 searching for, 34–39 Apps screen, 35–37 Internet access, connectivity changes, 412–414 AR (augmented reality), 459 layer separation, 494 architecture Live Tiles, 39 layers, 62 location-aware, 432–433 Windows 8 style applications, 66–67 CivicAddress class, 435 .NET Framework 4.5, installation model, Geocoordinate class, 434 80–81 geolocation, 433 , 68–70 Geoposition class, 433–434 arguments, navigation events, 366–367 GetGeopositionAsync method, 433–434 Assert class, 535–536 Location API, 435–441 Assert.AreEqual( ) method, 535 logos, on splash screen, 347–349 Assert.InInstanceOfType( ) method, 535 managed, 64–65 Assert.IsTrue( ) method, 535 native, 64–65 async keyword, 137, 144–145 packages async method, 138 creating, 323–325 asynchronous programming, 132–134 Package.appxmanifest, 326–327 APM (Asynchronous Programming pickers, 392–393 Model), 135 dialog box comparison, 393 C# RSS feeds and, 392 async keyword, 137 searching for, 34–39 async method, 138 Start screen, pinning to, 35–39 asynchronous callbacks, 142–144 switching between, 57 asynchronous keywords, 144–146 tablets, location-aware, 432–441 await keyword, 137 templates cancellation, 146–149 Grid application, 377–382 CancellationTokenSource Split application, 377–382 method, 149 touch-centric, 28 DownloadString method, 142 updates, background tasks, 507 DownloadStringAsync method, 144 Weather, 8–9 DownloadStringCompleted event, 142 Win32/.NET, 40 DownloadStringTaskAsync Windows App Certifi cation Kit, 553–554 method, 149 Windows 8 style DoWork method, 146 chromes, 46 keywords, 144–146 closing, 46–47 OnDownloadCompleted method, 144 fi lling, 48 select keyword, 138 multiple at once, 47–48 synchronous code writing, 139–142 searches, 51–52 TaskCanceledException, 149 snapping, 48 Write method, 140 switching between, 47 C++ operations, 484–486 Windows Live access, 420–428 development platform, 131–132 Windows Store EAP (Event-based Asynchronous Pattern), 135 app details, 542–543 JavaScript promises, 153–154 certifi cation process, 553 application initialization, 158–159 free trial periods, 544 chaining, 160–163 full-featured, 544 onSearchButtonClicked event in-app purchases, 545–547 handler, 158 submitting, 551–552 Twitter client creation, 154–158

578

012680bindex.indd 578 8/26/12 2:55 PM asynchrony – C++

managing asynchrony, 138 Brightness icon (Settings bar), 55 model, 134 btnEnableDisableGyroscope_Click .NET platform, 134–137 method, 455 TAP (Task-based Asynchronous Pattern), 136 btnRemoveFilter, 404 TPL (Task Parallel Library), 136 btnStart_Click event handler, 143, 148 Windows Runtime, 150–153 bugs, 526. See also debugging asynchrony, .NET Framework 4.5, 82 Button control, 256 ATL () for C/C++, 65 Disabled state, 287 attached properties, 238–239 HorizontalContentAlignment attribute syntax, XAML, 233 property, 286 audio element, 167 Normal state, 287 auto keyword, 469 PointerOver state, 287 Pressed state, 287 element, 334 VerticalContentAlignment property, 286 await keyword, 137, 144–145 visual states supported, 287 axes, accelerometer, 442 button element, 194

B C background tasks, 42, 502 C# application updates, 507 asynchronous callbacks, 142–144 Background Transfer API, 502 cancellation, 146–149 canceling, 507, 512–515 DownloadStringCompleted event, 142 conditions, 504–505 hybrid solutions, 495–496 creating, 507–512 keywords foreground applications and, 506 async, 137, 144–146 implementing, 507–516 asynchronous, 144–146 lock screen and, 505–506 await, 137, 144–146 overview, 503–504 select, 138 Playback Manager, 502 methods progress report, 512–515 async, 138 system resources and, 503 CancellationTokenSource, 149 trigger events, 504–505 DownloadString, 142 Background Transfer API, 502 DownloadStringAsync, 144 BackgroundTaskBuilder class, 511 DownloadStringTaskAsync, 149 BackgroundTaskHost.exe, 506 DoWork, 146 backward navigation, 363–366 OnDownloadCompleted, 144 bars. See also individual bars Write, 140 BeginGetResponse method, 135 synchronous code, writing, 139–142 BeginOperationName method, 135 TaskCanceledException, 149 BindableBase.cs fi le, 379 C++, 12–14 Binding class, 260 AMP (Accelerated Massive Parallelism), Blank Application template, 361 486–489 boolean type (JavaScript), 181 asynchronous operations, 484–486 BooleanNegationConverter.cs fi le, 379 component extensions (C++/CX), 472–473 BooleanToVisibilityConverter.cs fi le, 379 data types, 473 Border class, 252–253 DirectX technologies, 471 Border element, 252 hybrid solutions, 495–496 Properties, 252–253 and, 466–470 BottomAppBar, 309 Platform::String type, 481–483
element (HTML), 172 PPL (Parallel Pattern Library), 484–485 breakpoints in debugging, 526–527 project elements, 480–481 Breakpoints window (Debugger), 530 templates, 479

579

012680bindex.indd 579 8/26/12 2:55 PM C++ – classes

C++ (continued) CheckBox control, 257 using namespace clause, 76 chromes, 46 Visual Studio 2012, 468 CircularPanel class, 239 project creation, 478–479 CivicAddress class, 435 Win32 API services, 470 classes Windows 8 apps Accelerometer, 442–448 hybrid, 471 ApplicationData, 343–346 layers, 470 Assert, 535–536 privileges, 470–471 BackgroundTask Builder, 511 XAML and, 471 Binding, 260–261 Windows Runtime and, 471–472 Border, 252–253 classes, 474–475 Calculator, 536–538 collections, 483–484 CalculatorTest, 537 component implementation, 498–501 CircularPanel, 239 C++ AMP (Accelerated Massive Parallelism), 471 CivicAddress, 435 C++ for Windows Runtime, object CollectionViewSource, 300–301 management, 472–474 Compass, 457 C programming language, 10–12 ContactPicker, 393, 395 CalculateSerialButton_Tapped method, 487 DependencyObject, 238, 260 CalculateWithAMPButton_Tapped FileIO, 190 method, 487–488 FileOpenPicker, 190, 393 Calculator class, unit testing, 536–538 FileSavePicker, 190, 393, 394 CalculatorTest class, 537 FolderPicker, 393, 395 Calendar Live Tile, 32 FrameworkElement, 248 calendars, syncing, 32 Geocoordinate, 434 callbacks Geolocator, 433 complete, 158 Geoposition, 433–434 error, 158 Gyrometer, 448–455 progress, 158 GyrometerReading, 448–455 CancelAfter method, 149 important, 176–177 CancelCommandIndex property, 337 Inclinometer, 458 cancellation, C# 5.0, 146–149 KeyboardCapabi lities, 516–517 CancellationTokenSo urce method, Launcher, 375–377 146–147, 149 LayoutAwarePage, 384–386 canvas LicenseInformation, 544–545 drawing on, 218–221 LightSensor, 455–456 graphics, Windows 8 style apps, 217–221 ListViewBase, 298–299 canvas element, 167, 217 MatrixOperation, 489 raster images, 218 MessageDialog, 337–338 Canvas panel, 240 MouseCapabilities, 516, 517–518 Canvas.ZIndex property, 240 NetworkInformation, 412 Canvas.ZIndex property, 240 OrientationSensor, 460 capCreateCaptureWindow, 71 Page, 362 certifi cation process, Windows Store apps, 553 Panel, 238 chaining promises (JavaScript), 160–163 PointerDevice, 518 ChangedStateException, 476 PopupMenu, 329 charm bar ResourceDictionary, 248 Devices button, 54–55 SampleDataSource, 130, 383 overview, 50 SettingsPane, 340–341, 340–342 Search button, 51–52 SimpleOrientationSensor, 458–459 Settings button, 55–56 StorageFile, 394 Share button, 52–54 SyndicationClient, 415–419 Start button, 50–51 TextBlock, 254

580

012680bindex.indd 580 8/26/12 2:55 PM ClassNotRegisteredException – Converter property

TouchCapabilit ies, 516, 518 sizing, 40–42 Windows Runtime and C++, 474–475 Turn live tile off/on button, 40 Windows.UI.Popups.MessageDialog, 153 Uninstall button, 40 ClassNotRegisteredException, 476 context menu, 329–331 ClearAsync method, 344 contracts, 400 click event handler, 187 Search contract, 402–407 client-side code, JavaScript, 181, 184–187 Share Target, 407–411 cloud, 31. See also SkyDrive ControlChannelTrigger trigger event, 505 CLR (Common Language Runtime) controls .NET Framework 4.5, 80–81 Border element, 252 XML namespaces, 234 building (UI) user interface, 258–259 code-behind fi les, 236 complex, 298–309 collections ContentControl, 252 data binding and, 264–268 Button control, 256 Windows Runtime, 483–484 CheckBox, 257 CollectionViewSource class, 300–301 RadioButton, 257 ColorAnimation, 280 ScrollViewer, 257 columns ToggleSwitch, 258–259 Grid panel, 241–242 Frame, 237 rich text columns, 385–386 Grid panel, 242–243 COM (), 15, 71 Height property, 239 C++ and Windows Runtime, 471–472 HorizontalAlignment property, 239 exceptions, 471, 475–478 Image element, 253 object management, 471 ItemsControl, 252 Windows Runtime exceptions, 476 ListViewBase class, 298–299 ComException, 477–478 AppBar control, 309 commands, context menu, 329–331 FlipView control, 304–305 Common JS Promises/A proposal, 154 GridView control, 299–302 Compass class, 457 ListView control, 302–304 CompassReading object, 457 SemanticZoom, 305–306 CompassReadingChangedEventArgs, 457 Margin property, 239 complete callback, 158 Padding property, 239 complex controls, 298–309 Page, 361 ConnectionProfile object, 412 PasswordBox, 255 connectivity, change detection, 412–414 ProgressBar, 255–256 ContactPicker class, 393, 395 ProgressRing, 255–256 Contacts property, 518 properties ContactsSample app, 411 Height, 239 Content property, 367 HorizontalAlignment, 239 ContentControl, 252 Margin, 239 Button control, 256 Padding, 239 CheckBox control, 257 Template, 286 RadioButton control, 257 VerticalAlignment, 239 ScrollViewer control, 257 Width, 239 ToggleSwitch control, 258–259 SignInButton, 421 ContentControls, 252 TextBlock class, 254 ContentPresenter, 286 TextBox, 254–255 ContentThemeTransition, 274 VerticalAlignment property, 239 context bar, Live Tiles visual design, 285–298 Larger/Smaller button, 40 Width property, 239 on/off, 40–42 ControlTemplate, 286–289 Pin/Unpin from Start button, 39 Converter property, 260

581

012680bindex.indd 581 8/26/12 2:55 PM CppDemo Start solution – direct navigation

CppDemo Start solution, 480–481 commands, 527 createFileSync function, 162 Debugger toolbar, Visual Studio CreateRandomVector( ), 484 2012, 527–528 CreateTileUpdateForApplication( ) Edit and Continue, 531–532 method, 351 Immediate window, 529 CreateWindow method, 12 Locals window, 528 CSharpHybrid project, 495–497 running, 530–531 CSharpHybrid Start solution, 495 variables, 528–531 CSS (cascading style sheets), 172–173 Watch window, 529 class selectors, 175 debugging declarations, 173 breakpoints, 526–527 design and, 178–181 overview, 526–527 display::none, 226 Windows 8 style applications, application external style sheets, 174 lifecycle events, 532 id-selector, 176 Declarations tab, 401 important class, 176–177 declarative binding, 195 inline styles, 174 deeplinking, 39 layout and, 178–181 DefaultCommandIndex property, 337 rules, 175 Delphi, 15 selectors, 175 dependency properties descendant selectors, 177 data binding and, 260–262 style attribute, 174 XAML, 238 style blocks, 174 DependencyObject class, 238, 260 ctx.save( ) function, 221 dependent animations, 272 Current method, 344 design iconographic design style, 122 infographic desight style, 122 D language, 122–123 web pages, CSS and, 178–181 data binding, 195–196. See also template binding Windows 8 style applications, 123–124 collections and, 264–268 Windows Runtime, 68–69 DataContext property, 262–263 desktop, 25. See also Desktop app dependency properties, 260–262 applications, 63–65 directions, 262 switching beween programs, 57 display and, 259 Desktop app GridView control, 299–300 introduction, 56–57 list binding in HTML5, 199–201 switching between programs, 57 modes, 262 versus Windows 8 style applications, 84 notifi cations and, 260–262 detail pages, 127 simple binding in HTML5, 196–198 developer registration (Windows Store), 550–551 UI (user interface) and, 19 development tools, 9–19 value converters and, 263–264 C, 10–12 data display, data binding, 259 selecting, 83–85 data management devices data binding, 195–196 GUIs (graphical user interfaces), 26–27 data source updating, 201–204 input, 30 data source, updating, 201–204 position, 30 data.avatarUrl property, 196 support, 204–213 DataChanged method, 344 velocity, 30 DataContext property, 262–263 Devices button, charm bar, 54–55 DCOM (distributed component object model), 471 dialog boxes. See also pickers Debugger message dialog boxes, 337–340 Breakpoints window, 530 direct navigation, 359 changing code while debugging, 531–532

582

012680bindex.indd 582 8/26/12 2:55 PM Direct2D Application – fi les

Direct2D Application, 479 events Direct3D Application, 479 DownloadStringCompleted, 142 directives, using, 140 keypress, 187 DirectX technologies, C++ and, 471 navigation, arguments, 366–367 DisconnectedException, 476 No event, 316 DisplayApplicationPicker property, 377 OnLaunched, 316 display::none, 226 PointerPressed, 275 DisplayPrimesButton_Tapped method, 501 PositionChanged, 433 div element, data-win-options attribute, 201 PropertyChanged, 261 DiveLog.sln fi le, 363–366 ReadingChanged, 443 DLLs (Dynamic Link Libraries), 71 Resuming, 316 WinRT Component DLL, 479 SizeChanged, 384 DOCTYPE, 171 Suspending, 316 , 171 ExpirationDate property, 545 Document Outline tool, 362 Expression Blend document.getElementById function, 194 Assets panel, 292 DoubleAnimation, 280, 285 designer surface, 293 DownloadString method, 142 Device panel, 292 DownloadStringAsync method, 144 Objects and Timeline panel, 293 DownloadStringCompleted event, 142 Projects panel, 291 DownloadStringTaskAsync method, 147, 149 Properties panel, 294 DoWork method, 140, 146 Resources panel, 294–295 drawing, canvas, 218–221 States panel, 292 Duration property, 285 templates, customizing, 295–298 dynamic languages, 182 toolbar, 290–291 Expression Blend for Visual Studio 2012, 108 animated object, 111–115 E solutions, 109–111 external style sheets (CSS), 174 EAP (Event-based Asynchronous Pattern), 135 ElementName property, 260 elements (HTML), 168 F brackets, 168 canvas, 217 FadeInThemeAnimation, 275, 277 closing tag, 168 FadeOutThemeAnimation, 275, 277 embedding, 168 FailureException, 476 forward slash, 168 FeedItem, 416 opening tag, 168 feeds overlapping, 168–169 Atom, 415 self-closing tags, 168 RSS (Really Simple Syndication), 415 EndOperationName method, 135 Syndication API, 416–419 EntranceThemeTransition, 273, 274 syndication formats, 415 error callback, 158 XML (eXtensible Markup Language), 415 errorHandler parameter, 154 File Open Picker, 150–153 event handlers fi le pickers, 190 btnStart_Click, 143, 148 FileIO class ( Windows.Storage click, 187 namespace), 190 JavaScript, 186 FileOpenPicker class, 190, 393 ListView control, 203 FileTypeFilter property, 394 onSearchButton Clicked, 158 SuggestedStartLocation property, 394 SettingsCommandsRequested, 342 ViewMode property, 394 event-handlers, code (Visual Studio IDE), 97–99 fi les launching, 375–377 metadata, 72–74

583

012680bindex.indd 583 8/26/12 2:55 PM FileSavePicker class – Hello World

FileSavePicker class, 190, 393, 394 GetInternetConnectionProfile FileTypeFilter property, 394 method, 412, 414 fi ling apps, 48 getItemsAsync function, 201 Fill property, LinearGradientBrush, 233 GetPointerDevices( ) method, 518 FlipView control, 304–305 GetPrimes method, 501 FlyInRectangle element, 112–113 GoToState method, 276 FolderPicker class, 393, 395 GPS (Global Positioning System), 30 folders, Pictures Library, 198 tablets and, 431 forEach function, 201 Windows Runtime, 78 form element (HTML), 172 graphics foward navigation, 363–366 canvas, Windows 8 style apps, 217–221 Frame control, 237 vector graphics, 233 Frame.Navigate method, 368 GreetMe application, 234–237 FrameworkElement class, 248 Grid Application template, 377–382 free trial versions of apps, 544 GroupDetailPage.xaml, 381 fulfilledHandler parameter, 154 GroupedItemsPage.xaml, 380 function type (JavaScript), 181 infrastructure fi les, 379–380 functions ItemDetailPage .xaml, 381 addEventListener, 194 rich text columns, 385–386 app.onactivated, 159 Grid panel, 241–243 createFileSync , 162 Grid.ColumnSpan property, 243 ctx.save( ), 221 Grid.RowSpan property, 243 document.getElementById, 194 GridView control forEach, 201 data binding, 299–300 getItemsAsync, 201 data grouping, 300–301 onBtnHideClicked, 227 ItemsControl, 299–300 onBtnNextClicked, 227 visual groups, 301–302 onOpenButtonClicked, 194 GroupDetailPage.xaml, 130 onSearchButtonClicked, 160–161 GroupedItemsPage.xaml, 130 passing as parameters, 183–184 groups pickSingleFileAsync, 194 GridView control, 300–301 quadraticCurveTo, 221 visual groups, 301–302 refresh, 213 Live Tiles then, 154 creating, 43 WinJS.UI.processAll, 159, 194, 197 managing, 44–46 writeTextAsync, 163, 195 GUIs (graphical user interfaces), devices, 26–27 Gyrometer class, 448–455 GyrometerReading class, 448–455 G GyrometerReadingChangedEventArgs, 448 gyroscope, 30, 448–455 GameCompleted method, 339 GDI (Graphics Device Interface), 17 Geocoordinate class, 434 H geolocation, 433 Geolocator class, 433 h1 element (HTML), 172 Geoposition class, 433–434 h2 element (HTML), 172 gestures, 26–29 h3 element (HTML), 172 problems, 125 Heading property, 434 GetCurrentReading method, 443 Height property, 239 GetDefault method, 448 Grid panel, 241–242 GetDeferral( ) method, 515 Hello World GetFeed method, 419 C++, 13–14 GetGeopositionAsync method, 433–434 MS-DOS, 10–11 XAML, 17–18

584

012680bindex.indd 584 8/26/12 2:55 PM hierarchical navigation – JavaScript

hierarchical navigation, 359–360 mouse, 26 HorizontalAlignment property, 239 capabilities, 517–518 HorizontalContentAlignment property, 286 multi-touch, 27–28 HorizontalScrollBarVisibility property, 257 pointers, querying information, 518–520 HorizontalWheelPresent property, 517 querying capabilities, 516 HTAs (HTML Applications), 65 installation, Visual Studio 2012 Express for HTML (HyperText Markup Language), 166 Windows 8, 91–93 attributes, 168 installed apps , 171 browsing for, 34–39 elements, 168–169 searching for, 34–39 HTML5, Working Draft, 166 interfaces style attribute, CSS and, 174 IAsyncOperation, 153 HTML5 IAsyncOperation, 153 data binding IBackground, 507 list binding, 199–201 IListDataSource, 201 simple binding, 196–198 INotifyPropertyChanged, 261 , 171 Internet connectivity, change detection, 412–414 drawing in, 167 InternetAvailable condition, 505 new elements, 167 InternetNotAvailabl e condition, 505 web page creation, 169–172 InvalidArgumentException, 476 Windows Runtime, 188 InvalidCastException, 476 WinJS, 188–189 IsActive property, 545 Working Draft, 166 IsEnabled property, 366 hub navigation, 358 IsOn property, 258 hub pages, 125–127 IsStateSaved method, 346 hybrid solutions, 494–495 IStorageFile, 190 C#, 495–496 IsTrial property, 545 C++, 495–496 ItemClickEventArgs, 308 itemDataSource property, 201, 212 ItemDetailPage, 130, 308 I ItemsControl, 252, 299–300 itemTemplate property, 201, 212 IAsyncOperation interface, 153 IValueConverter interface, 263 IAsyncOperation interface, 153 IBackground interface, 507 iconographic design style, 122 J IDE (Integrated Development Environment), 14–15 ILDASM utility, 73–74 JavaScript. See also WinJS (Windows Library for IListDataSource interface, 201 JavaScript) Image element, 253 boolean type, 181 Stretch enumeration values, 253 client-side code, 181, 184–187 images, Live Tiles, 352 Common JS Promises/A proposal, 154 img element, 195–196 event handlers, 186 Immediate window (Debugger), 529 fi le pickers, 190 important class, 176–177 function type, 181 Imports keyword (Visual Basic), 76 IStorageFile object, 190 inclinometer, 457–458 keypress event, 187 Inclinometer class, 458 number type, 181 independent animations, 272 object type, 181 infographic design style, 122 promises, 153–154 inline styles, 174 application initialization, 158–159 INotifyPropertyChanged interface, 261 chaining, 160–163 input devices, 30 onSearchButtonClicked event keyboard, 26 handler, 158 capabilities, 516–517 Twitter client creation, 154–158

585

012680bindex.indd 585 8/26/12 2:55 PM JavaScript – ListViewBase class

JavaScript (continued) Windows 8 style applications, 65 string type, 181 architecture layers, 66–67 variables layout declaring, 182 Canvas panel, 240 testing value, 183 complex, building, 244–247 Windows 8 style applications, 189 Grid panel, 241–242 canvas graphics, 217–221 StackPanel, 240–241 data management, 195–204 VariableSizedWrapGrid panel, 243–244 fi lesystem access, 190–195 web pages, CSS and, 178–181 scrolling, 213–217 layout system, UI (user interface) and, 18 Windows 8 Animation Library, 222–227 LayoutAwarePage class, 384–386 zooming, 213–217 LayoutAwarePage.cs fi le, 380 JIT (just-in-time) compiler, 15, 466 lbxPosts_SelectionChanged method, 418 JVM (Java virtual machine), 90 libraries Animation, 272–276, 277–280 ATL (Active Template Library) for C/C++, 65 K Blank Dynamic-Link Library, 479 Blank Static Library, 479 Kay, Alan, 122 Pictures Library folder, 198 Kernel Layer, 64 TPL (Task Parallel Library), 136 keyboard, 26 Unit Test Library, 479 capabilities, 516–517 Visual Component Library (VCL) for software, 29–30 Delphi, 65 Keyboard locale icon (Settings bar), 56 Windows 8 Animation Library, 222–227 KeyboardCapabilities class, 516–517 WinJS (Windows Library for JavaScript), keypress event, 187 188–189 keywords LicenseChanged property, 545 async, 144–145, 144–146 LicenseInformation class, 545–546 asynchronous, C#, 144–146 LicenseInformation property, 544 auto, 469 lifecycle of Windows 8 style applications await, 144–145, 144–146 debugging events, 532 public, 475 events, 316–322 Visual Basic, Imports, 76 not running state, 314 running state, 314 state changes, 315–316 L suspended state, 314 Language Layer, 64 terminated state, 314 LightSensor Language Projections layer (Windows Runtime), class, 455–456 76–78 list binding, 195 languages. See design, language; programming HTML5, 199–201 languages list controls, Start screen, 33 ListBox laptops, 26 control, 302–304 ListView Larger/Smaller button (Live Tiles), 40 control Latitude property, 434 event handler, 203 itemDataSource Launcher class, 375–377 property, 201, 212 itemTemplate LaunchFileAsynch method, 375 property, 201, 212 layout launching property, 212 ListBox fi les, 375–377 control and, 302–304 Pictures Library, web pages, 375–377 200 refresh LaunchUriAsync method, 375 function, 213 ListViewBase layers class, 298–299 desktop applications, 64–65 controls AppBar, separation, 494 309 FlipView, 304–305

586

012680bindex.indd 586 8/26/12 2:55 PM Live – methods

GridView, 299–302 MaintenanceTrigger trigger event, 505 ListView, 302–304 managed applications, 64–65 SemanticZoom, 305–306 managed environment (.NET), 16 Live, log in, 31 managed languages (.NET), 16 Live ID. See Microsoft Accounts Margin property, 239 Live Tiles, 32 MatrixOperation class, 489 apps, starting, 39 media elements, UI (user interface) and, 18 context bar media queries, 213 Larger/Smaller button, 40 menus, context menu, 329–331 on/off, 40–42 message dialog boxes, 337 Pin/Unpin from Start button, 39 adding to apps, 338–340 sizing, 40–42 MessageDialog class, 337–339 Turn live tile off/on button, 40 Messaging Live Tile, 32 Uninstall button, 40 metadata, Windows Runtime, 70–71 deeplinking, 39 fi les, 72–74 extra features, 352 format, 71–72 groups, 43–46 namespaces, 75–76 images, 352 methods notifi cations, 349–350 AddNote, 411 format, 350 appendLinesAsync, 190 removing, 351 appendTextAsync, 190 samples, 353 Assert.AreEqual( ), 535 square, 351 Assert.InInstanceOfType( ), 535 updating, 350–351 Assert.IsTrue( ), 535 wide, 351 async, 138 number on screen, 33 BeginGetResponse, 135 reordering, 42–43 BeginOperationName, 135 LoadProfile method, 428 btnEnableDisableGyroscope_Click, 455 local resources, 249 CalculateSerialButton_Tapped, 487 LocalFolder method, 344 CalculateWithAMPButton_Tapped, Locals window (Debugger), 528 487–488 LocalSettings method, 344 CancelAfter, 149 Location API, 435–441 CancellationTokenSource, 146–147, 149 location-aware applications, 432–433 ClearAsync, 344 CivicAddress class, 435 CreateTileUpdateForApplication( ), 351 Geocoordinate class, 434 CreateWindow, 12 Geolocator class, 433 Current, 344 Geoposition class, 433–434 DataChanged, 344 GetGeopositionAsync method, 433–434 DisplayPrimesButton_Tapped , 501 Location API, 435–441 DownloadString, 142 lock screen, background tasks and, 505–506 DownloadStringAsync, 144 log in, 30–31 DownloadStringTaskAsync, 147, 149 Microsoft Accounts and, 30–31 DoWork, 140, 146 logical pages, templates, 385 EndOperationName, 135 Longitude property, 434 Frame.Navigate, 368 GameCompleted, 339 GetCurrentReading, 443 M GetDefault, 448 GetDeferral( ), 515 magnetometer, 30 GetFeed, 419 Compass class, 457 GetGeopositionAsync, 433–434 MainPageRightTapped method, 331 GetInternetConnectionProfile, 412, 414 MainPage.xaml fi le, 361 GetPointerDevices( ), 518 MainPage.xaml.cs, 98 GetPrimes, 501

587

012680bindex.indd 587 8/26/12 2:55 PM methods – namespaces

methods (continued) StartNew, 336 GoToState, 276 SumAVectorButton_Tapped, 483 IsStateSaved, 346 TemporaryFolder, 344 LaunchFileAsynch, 375 then, 190 LaunchUriAsync, 375 TileUpdateManager. lbxPosts_SelectionChanged, 418 GetTemplateContent( ), 350 LoadProfile, 428 TimeCallback, 515 LocalFolder, 344 Version, 344 LocalSettings, 344 Write, 140, 141 MainPageRightTapped, 331 writeBufferAsync, 190 MultiplyAMP, 488 writeBytesAsync, 190 MultiplySequential, 488 writeLinesAsync, 190 Navigate, 366 writeTextAsync, 190 NewGameTapped, 338 MFC (Microsoft Foundation Classes), 65 NextButtonClicked, 364 Visual Studio and, 90 OnCompleted, 512 Microsoft, C++ and, 466–470 OnDownloadCompleted, 144 Microsoft Accounts, 30–31 OnLaunched, 237 MinimumReportInterval property, 442 OnNavigatedFrom, 368 Mobile World Congress, 6–7 OnNavigatedTo, 278, 366–367 Mode property, 260 OnNavigatingFrom, 368 mouse, 26 OnProgress, 515 capabilities, 517–518 OnResuming, 319 MouseCapabilities class, 516, 517–518 OnShareTargetActivated, 407 mouseOverEllipse, 289 OnSuspending, 318, 322 MousePresent property, 517 OpenContacts, 396–397 MS-DOS, Hello World program, 10–11 OperationName, 135 MSIL (Microsoft Intermediate Language), 15, 466 PickMultipleFileAsync, 394 multiple programming languages, hybrid PickSingleFileAsync, 153, 394 solutions, 494–495 readBufferAsync, 190 C#, 495–496 readLinesAsync, 190 C++, 495–496 readTextAsync, 190 MultiplyAMP method, 488 RectangleTappe d, 98 MultiplySequential method, 488 RefreshData, 438 Multitasking, 4–5 RefreshNetworkInfo, 413–414 multithreading, 132 Register( ), 511 multi-touch gestures, 26, 27–28 RegisterClass, 12 MVVM (Model-View-ViewModel) template RemoveFilter, 404 design, 381 RemovePuzzleState, 346 ResetGameButtonTapped, 338 RestorePuzzleState, 346 N RetrieveFeedAsync, 416 RoamingFolder, 344 namespaces, 75–76 RoamingSettings, 344 Platform::Collections, 483–484 RoamingStorageQuota, 344 references, xmlns:prefix attribute, 234 SaveContactsToFile, 398 Windows.ApplicationModel. SavePuzzleState, 346 Background, 507 SetTrigger( ), 511 Windows.ApplicationModel ShareButton_Click, 411 .Contacts, 399 showAsync, 195 Windows.Devices.Geolocation, 433 ShowForSelectionAsync, 331 Windows.Devices.Sensors, 448 ShowWindow, 12 Windows.Networking.Connectivity, 412 sp_SuggestionsRequested, 404 Windows.Storage, FileIO class, 190

588

012680bindex.indd 588 8/26/12 2:55 PM native applications – orientation

Windows.Storage.Pickers NextButtonClicked method, 364 FileOpenPicker class, 190 No event, 316 FileSavePicker class, 190 not running state of application, 314 Windows.UI.ApplicationSettings, notifi cations 340–341 data binding and, 260–262 Windows.Web.Syndication, 415 Live Tiles, 350–351 WinJS.Binding, 196 Notifi cations icon (Settings bar), 55–56 XAML, GreetMe application, 234–237 NotImplementedException, 476 native applications, 64–65 NullReferenceException, 476 native languages, 16 number type (JavaScript), 181 nav bar, 125 NumberOfButtons property, 517 Navigate method, 366 navigation app bars, 369–375 O away from pages, 368–369 backward, 363–366 Object Pascal, 65 direct navigation, 359 object type (JavaScript), 181 events, arguments, 366–367 ObjectAnimation, 281 forward, 363–366 objects, IStorageFile, 190 Frame.Navigate method, 368 OffContent property, 258 hierarchical, 359–360 ol element (HTML), 172 hub navigation, 358 OLE (Object Linking and Embedding), 15, 471 Navigate method, 366 onBtnHideClicked function, 227 NavigationEventArgs argument, 366 onBtnHidePanelClicked function, 227 OnNavigatedTo method, 366 onBtnNextClicked function, 227 Page class, 362 onBtnShowPanelClicked function, 227 pages, 363–366 OnCompleted method, 512 parameters, 367–368 OnContent property, 258 patterns OnDownloadCompleted method, 144 direct navigation, 359 OneTime binding mode, 262 hierarchical navigation, 359–360 OneWay binding mode, 262 hub navigation, 358 OnLaunched event, 316 semantic zoom, 361 OnLaunched method, 237 templates and, 378 OnNavigatedFrom method, 368 Navigation Mode label, 368 OnNavigatedTo method, 278, 366–367 NavigationCancelEventArgs argument, 368 OnNavigatingFrom method, 368 NavigationEventArgs argument, 366–367 onOpenButtonClicked function, 194 properties, 367 OnProgress method, 515 NavigationMode property, 367 OnResuming method, 319 .NET Base Class Libraries, 82 onSearchButtonClicked event handler, .NET Framework, 15–17 158, 160–161 apps, 40 OnShareTargetActivated method, 407 asynchronous programming, 134–137 OnSuspending method, 318, 322 asynchrony, 82 OPC (Open Packaging Convention), 323 installation model, 80–81 Open fi le location button, 40 Windows Runtime, integration, 81–82 Open new window button, 40 WPF (Windows Presentation Foundation), OpenContacts method, 396–397 232–233 operating system, threads, 132 Network icon (Settings bar), 55 OperationCanceledException, 476 network information acquisition, 412–414 OperationName method, 135 NetworkInformation class, 412 orientation NetworkStatusChange system event trigger, 504 detecting, 459–460 NewGameTapped method, 338 simple orientation sensor, 458–459

589

012680bindex.indd 589 8/26/12 2:55 PM orientation sensor – projects

orientation sensor, 460 FolderPicker, 393, 395 OrientationSensor class, 460 PickSingleFileAsync method, 394 OutOfBoundsExceptio n, 476 using, 396–399 OutOfMemoryException, 476 PickMultipleFileAsync method, 394 PickSingleFileAsync function, 194 PickSingleFileAsync method, 153, 394 P picture password, 31 Pictures Library folder, 198

element (HTML), 172 PIN password, 31 Package.appxmanifest, 402–407 Pin to taskbar button, 40 packages pinch gesture, 28–29 creating, 323–325 pinning to Start screen, apps, 35–39 Package.appxmanifest, 326–327 Pin/Unpin from Start button, 39 Padding property, 239 PlaneProjections, 283–285 Page control, 361 Platform::Collections namespace, 483–484 page resources, 249 Platform::String type, 481–483 Page.Resources section, 251 Playback Manager, 502 PageRoot element, 366 pointer devices, querying information, 518–520 pages PointerDevice class, 518 MainPage.xaml, 361 PointerOver state, 289 navigating away from, 368–369 PointerPressed event, 275 navigation among, 363–366 PopInThemeAnimation, 275 Panel class, 238 PopOutThemeAnimation, 275 panels PopupMenu class, 329 Canvas, 240 Position property, 433 Grid, controls in, 242–243 PositionChanged event, 433 StackPanel, 240–241 Power options icon (Settings bar), 56 VariableSizedWrapGrid, 243–244 PPL (Parallel Pattern Library), 484–485 panning, 214–215 preemptive multitasking, 5 Parameter property, 367 PrimeNumbers node, 498–501 parameters ProductLicenses property, 545 navigation, 367–368 programmatic binding, 196 passing functions as, 183–184 programming parsing, 416 asynchronous, 132–134 passing functions as parameters, 183–184 model, 134 PasswordBox control, 255 synchronous, 132 passwords tasks, 132–133 picture password, 31 threads, blocked, 133 PIN password, 31 programming languages Path property, 260 C, 10–12 patterns of navigation C++, 12–14 direct navigation, 359 dynamic, 182 hierarchical navigation, 359–360 managed languages, 16 hub navigation, 358 multiple, hybrid solutions, 494–495 semantic zoom, 361 native languages, 16 People Live Tile, 32 selecting, 85 persisting application data, 343 Windows Runtime, 76–78 application data stores, 343 progress callback, 158 pickers, 392–393 ProgressBar control, 255–256 ContactPicker, 393, 395 ProgressRing control, 255–256 dialog box comparison, 393 Projection property, 285 FileOpenPicker, 393 projects, SimpleRectangles, 100 FileSavePicker, 393, 394

590

012680bindex.indd 590 8/26/12 2:55 PM promises – ResourceDictionary class

promises (JavaScript), 153–154 ReportInterval, 442 application initialization, 158–159 SlotIndex, 238–239 chaining, 160–163 Source, 260 Common JS Promises/A proposal, 154 SourcePageType, 367 Twitter client, 154–158 Speed, 434 properties SuggestedStartLocation, 394 Accuracy, 434 Template, 286 Altitude, 434 TextBlock class, 254 AltitudeAccura cy, 434 Timestamp, 434 attached properties, 238–239 Uri, 367 Binding class, 260 VerticalContentAlignment, 286, 297 BorderThickness, 253 VerticalScrollBarVisibility, 257 CancelCommandIndex, 337 ViewMode, 394 Canvas.ZIndex, 240 PropertyChanged event, 261 Content, 367 protected mode, Windows 3.1, 4 Converter, 260 public keyword, 475 CornerRadius, 253 PushNotificationTrigger trigger event, 505 data binding, DataContext, 262–263 data.avatarUrl, 196 DefaultCommandIndex, 337 Q dependency properties, 238 DisplayApplicationPicker, 377 quadraticCurveTo function, 221 Duration, 285 ElementName, 260 ExpirationDate, 545 R FileTypeFilter, 394 RAD (Rapid Application Development), 15 Fill, LinearGradientBrush, 233 RadioButton control, 257 Grid panel, 241–242 raster images, 218 Grid.ColumnSpan, 243 readBufferAsync method, 190 Grid.RowSpan, 243 ReadingChanged event, 443 Heading, 434 readLinesAsync method, 190 HorizontalContentAlignment, 286 Readme.txt fi le, 380 HorizontalScrollBarVisibility, 257 readTextAsync method, 190 IsActive, 545 RectangleTapped method, 98 IsEnabled, 366 referencing namespaces, xmlns:prefix, 234 IsTrial, 545 refresh function, 213 itemDataSource, 201, 212 RefreshData method, 438 itemTemplate, 201, 212 RefreshNetworkInfo method, 413–414 Latitude, 434 Register method, 511 LicenseChanged, 545 RegisterClass method, 12 LicenseInformation, 544 registration (Windows Store), 550–551 Longitude, 434 regression tests, 534 MinimumReportInterval, 442 RemoveFilter method, 404 Mode, 260 RemovePuzzleState method, 346 NavigationEventArgs argument, 367 render transformations, 281–282 NavigationMode, 367 RenderTransformOrigin property, 282 Parameter, 367 ReorderThemeTransition, 274 Path, 260 ReportInterval property, 442 Position, 433 RepositionThemeTransition, 274 ProductLicenses, 545 ResetGameButtonTapped method, 338 Projection, 285 resolution, Live Tiles, number of, 33 RenderTransformOrigin, 282 ResourceDictionary class, 248, 249

591

012680bindex.indd 591 8/26/12 2:55 PM resources – software keyboard

resources fusion data, 456 application, 249 inclinometer, 457–458 local, 249 magnetometer, 457 page, 249 simple orientation sensor, 458–459 XAML, 248–251 gyroscope, 448–455 Resources collection, 248 Gyrometer class, 448–455 RestorePuzzleState method, 346 GyrometerReading class, 448–455 Resuming event, 316, 378 orientation sensor, 460 RetrieveFeedAsync method, 416 tablets, 432 rich text columns, 385–386 SessionConnected condition, 505 RichTextColumns.cs fi le, 380 SessionDisconnected condition, 505 RoamingFolder method, 344 Settings bar RoamingSettings method, 344 Brightness icon, 55 RoamingStorageQuota method, 344 Keyboard locale icon, 56 rotate gesture, 28–29 Network icon, 55 rotateStoryboard, 285 Notifi cations icon, 55–56 RotateTransform transformation, 282 Power options icon, 56 RotatingPanelIn3D project, 530–531 Volume icon, 55 rows, Grid panel, 241–242 Settings button, charm bar, 55–56 RSS feeds (Really Simple Syndication), 392 settings charm, 340–342 Run as Administrator button, 40 SettingsCommand, 342 running state of application, 314 SettingsCommandsRequested event-handler Runtime Layer, 64 method, 342 SettingsPane class, 340–341, 340–342 SetTrigger( ) method, 511 S Share button, charm bar, 52–54 Share Target contract, 407–411 SampleDataSource class, 130, 383 ShareButton_Click method, 411 SampleDataSource.cs fi le, 380, 382–383 ShareTargetPage.xaml, 409 sandbox, security, 78–79, 323 showAsync method, 195 SaveContactsToFile method, 398 ShowForSelectionAsync method, 331 SavePuzzleState method, 346 ShowWindow method, 12 ScaleTransform transformation, 282 SignInButton control, 421 screen Silverlight, 18–19 resolution, Live Tiles, number, 33 data binding, 19 Start screen, 7–8, 31 simple data binding, 195 list controls, 33 HTML5, 196–198 scrolling, 213–217 simple orientation sensor, 458–459 ScrollViewer control, 257 SimpleOrientationSensor class, 458–459 Search button, charm bar, 51–52 SimplePuzzle application, 332–333 Search contract, 402–407 SimpleRectangles project, 100 searches animation, 109–111 apps, installed, 34–39 Simulator (Visual Studio 2012), 533–534 Windows 8 apps, 51–52 Sinofsky, Steven, 6 security, sandbox, 78–79, 323 SizeChanged event, 384 select keyword, 138 SkewTransform transformation, 282 semantic zoom, 361 SkyDrive, 31. See also cloud SemanticZoom control, 305–306 skymap apps, 460 Sensor Fusion API, 456–459 slates. See tablets sensors, 30, 441 slide gesture, 28–29 Accelerometer class, 442–448 SlotIndex property, 238–239 accelerometers, 442–448 snapping apps, 48 ambient light sensor, 455–456 software keyboard, 29–30 AR (augmented reality), 459

592

012680bindex.indd 592 8/26/12 2:55 PM software testing – templates

software testing, unit testing, 534–535 syndication formats, feeds, 415 Solution Explorer, 130 SyndicationClient class, 415–419 solutions (Visual Studio IDE), 94 system resources, 250 Expression Blend and, 109–111 background tasks and, 503 Source property, 260 SourcePageType property, 367 span element, 194 T Speed property, 434 splash screen, application logo, 347–349 tablets, 27 SplashScreenSample, 103 accommodating, 432 Split Application template, 377–382 GPS and, 431 features, 386–387 location-aware applications, 432–433 infrastructure fi les, 379–380 CivicAddress class, 435 ItemsPage.xaml, 380 Geocoordinate class, 434 logical pages, 385 Geolocator class, 433 SplitPage.xaml, 380 Geoposition class, 433–434 sp_SuggestionsRequested method, 404 GetGeopositionAsync method, StackPanel panel, 240–241 433–434 StandardSTyles.xaml fi le, 380 Location API, 435–441 star value, 241–242 sensors, 432, 441 Start button, 57–58 Accelerometer class, 442–448 charm bar, 50–51 accelerometers, 442–448 Start screen, 7–8, 31 ambient light sensor, 455–456 apps, pinning, 35–39 fusion data, 456–460 Calendar Live Tile, 32 Gyrometer class, 448–455 list controls, 33 GyrometerReading class, 448–455 starting apps, Live Tiles, 39 gyroscope, 448–455 StartNew method, 336 inclinometer, 457–458 StaticResource markup extension, 248 magnetometer, 457 StatusDispatcher object, 515–516 orientation sensors, 460 StorageFile class, 394 simple orientation sensor, 458–459 storyboards, 274–276 tap and hold gesture, 28–29 Stretch enumeration values, 253 tap gesture, 28–29 Stretch values, 253 TapDownThemeAnimation, 275 string type (JavaScript), 181 TapUpThemeAnimation, 275 Stroustrup, Bjarne, 12 TaskCanceledException, 149 style attribute (HTML), CSS and, 174 tasks, programming, 132–133 style blocks (CSS), 174 template binding, 287 styles Template property, 286 UI (user interface) and, 18 templates WPF (Windows Presentation Foundation), 233 application layout, 378 stylus, 30 Blank Application, 361 SuggestedStartLocation property, 394 C++ and, 479 SumAVectorButton_Tapped method, 483 Expression Blend, 290–298 suspended state of application, 314 Grid Application, 377–382 Suspending event, 316–317, 378 infrastructure fi les, 379–380 SuspensionManager.cs fi le, 380 LayoutAwarePage class, 384–386 SwatButtons property, 517 logical pages, 385 swipe gesture, 28–29 navigation support, 378 swipe from edge, 28–29 rich text columns, 385–386 switching between programs, 57 runtime data, managing, 382–384 synchronous programming, 132 sample data, 378 C# 5.0, 139–142 managing, 382–384 Syndication API, 416–419 SampleDataSource.cs fi le, 382–383

593

012680bindex.indd 593 8/26/12 2:55 PM templates – UIs

templates (continued) Timestamp property, 434 Split Application, 377–382 TimeTrigger trigger event, 505 state management, 378 TimeZoneChange system event trigger, 504 UI (user interface) and, 18 ToggleSwitch control, 258–259 Visual Studio, 130 TopAppBar, 309 WPF (Windows Presentation Foundation), 233 touch screens, multi-touch gestures, 26 TemporaryFolder method, 344 TouchCapabilities class, 516, 518 terminated state of application, 314 touch-centric apps, 28 testing TouchPresent property, 518 regressing testing, 534 TPL (Task Parallel Library), 136 unit testing, 534–535 track element, 167 Windows 8 style apps, 535–538 transformations, 281–282 text blocks, Expression Blend for Visual 2012, 3D space, 283–285 111–115 center point, 282–283 textarea element, 194 multiple, 283 TextBlock class, 254 TransformGroup, 283 TextBox control, properties, 254–255 transitions Theme animations (Animation Library), 273 Theme transitions, 273–274 FadeInThemeAnimation, 275 EntranceThemeTransition, 273 FadeOutThemeAnimation, 275 visual states, 276–280 PopInThemeAnim ation, 275 visual transitions, 276–277 PopOutThemeAnimation, 275 TranslateTransform transformation, 282 storyboards, 274–276 trial versions of apps, 544 TapDownThemeAnimation, 275 trigger events for background tasks TapUpThemeAnimation, 275 ControlChannelTrigger, 505 Theme transitions (Animation Library), 273–274 MaintenanceTrigger, 505 AddDeleteThemeTransition, 274 NetworkStatusChange, 504 ContentThemeTransition, 274 PushNotificationTrigger, 505 EntranceThemeTransition, 273, 274 TimeTrigger, 505 ReorderThemeTransition, 274 TimeZoneChange, 504 RepositionThemeTransition, 274 UserAway, 504 then function, 154 UserPresent, 504 then method, 190 try-catch block, 148 threads, 132–133 tsAccuracy, 437 tiles. See also Live Tiles tsLocationTracking, 437 Calendar Live Tile, 32 Turn live tile off/on button (Live Tiles), 40 extra features, 352 TwoWay binding mode, 262 images, 352 Live Tiles, 32 Messaging Live Tile, 32 U notifi cations, 349–350 format, 350 UI Layer, 64 removing, 351 UI (user interface) technologies, 17–19 samples, 353 UICommand object, 331 square, 351 UICommandSeparator object, 331 updating, 350–351 UIElement, 282 wide, 351 UIs (user interfaces) People Live Tile, 32 building, controls, 258–259 Weather Live Tile, 32 controls, 239 TileTemplateType enumeration value, 350 desktop, 25 TileUpdateManager.GetTemplateContent( ) Windows 8 style, 25 method, 350 XAML and, 232–234 TimeCallback method, 515 layout management system, 237–248

594

012680bindex.indd 594 8/26/12 2:55 PM ul element –

ul element (HTML), 172 Debugger toolbar, 527–528 Uninstall button (Live Tiles), 40 deployment targets, 532–534 unit testing, 534–535 Simulator, 533–534 Windows 8 style apps, 535–538 Visual Studio 2012 Express for Uri property, 367 Windows 8, 91 UserAway system event trigger, 504 Visual Studio 2012 Express for Windows 8, UserNotPresent condition, 505 installation, 91–93 UserPresent condition, 505 Visual Studio IDE, 93 UserPresent system event trigger, 504 debugging, 99–101 using directive, 140 document windows, 106–107 using namespace clause (C++), 76 event-handler code, 97–99 utilities, ILDASM, 73–74 extensions, 103–105 page design, 95–97 projects, creating, 94–101 V Quick Launch, 107–108 running project, 99–101 value converters, data binding and, 263–264 samples, 101 variables, debugging and, 528–531 project creation, 102–103 VariableSizedWrapGrid panel, 243–244 solutions, 94 MaximumNumberOfRowsOrColumns Expression Blend and, 109–111 property, 243 Start Page, 106 Orientation property, 243 tool windows, 106–107 VB Runtime for Visual Basic, 65 Visual Studio Extension Manager, 103–105 VBA (Visual Basic for Applications), 15 visual transitions, 276–277 vector graphics, 233 VisualStateGroups, 276 Version method, 344 Volume icon (Settings bar), 55 VerticalAlignment property, 239 VerticalContentAlignment property, 286, 297 VerticalScrollBarVisibility property, 257 W VerticalWheelPresent property, 517 video element, 167 W3C (World Wide Web Consortium), 166 ViewMode property, 394 Watch window (Debugger), 529 VisibilityGroup, 276 Weather application, 8–9 Visual Basic, 14–15 Weather Live Tile, 32 Imports keyword, 76 web pages Visual Component Library (VCL) for Delphi, 65 design, CSS and, 178–181 visual look of controls, 285–298 HTML5, 169–172 visual states, 276–280 JavaScript, client-side code, 184–187 GoToState method, 276 launching, 375–377 VisibilityGroup, 276 layout, CSS and, 178–181 visual transitions, 276–277 Width property, 239 Visual Studio, 14 Grid panel, 241–242 Expression Blend for Visual Studio 2012, 108 Win32 API animated object, 111–115 DLLs (Dynamic Link Libraries), 71 solutions, 109–111 services, C++ and, 470 history, 90–91 Win32 apps, 40 mixed codebase, 20 Windows .NET and, 16–17 3.1, 4–5 templates, 130 Hello World program, 10–11 Visual Studio Professional/Premium/ original release, 3–4 Ultimate, 91 windows Visual Studio 2012, 90 SizeChanged event, 384 C++ and, 468 Visual Studio IDE, 106–107 project creation, 478–479 Windows 7, 6

595

012680bindex.indd 595 8/26/12 2:55 PM Windows 8 – Windows Store

Windows 8 resuming, 316–317 applications, C++ and searches, 51–52 hybrid apps, 471 settings charm, 340–342 layers, 470 signatures, 327 privileges, 470–471 snapping, 48 XAML and, 471 structure, 124–131 consumers and, 6–7 suspending, 316–317 market introduction, 7–9 switching between, 47 Windows 8 Animation Library, 222–227 testing, unit testing, 535–538 Windows 8 style applications, 8 unstalling, 328 app bar, 331–332, 336–337 updating, 328 adding to screen, 332–333 Visual Studio 2012, deployment targets, responding to events, 335–336 532–534 app tiles, notifi cations, 349–353 Windows App Certifi cation Kit, 553–554 ApplicationData class, 343–346 , 232 chromes, 46 Windows Forms Application template, 16 closing, 46–47, 316–317 Windows Live. See Live context menu, 329–331 application access, 420–428 creating, 129–131 Windows Phone 7, 6–7 debugging, application lifecycle events, 532 Windows Runtime, 62 deploying, 322–323 architecture, 68–70 design language, 122–123 asynchronous programming, 150–153 design principles, 123–124 benefi ts, 78–79 versus Desktop applications, 84 C++, 471–472 desktop applications comparison, 63 classes, 474–475 fi ling, 48 collections, 483–484 installation, 328 C++ for Windows Runtime, object JavaScript, 189 management, 472–474 canvas graphics, 217–221 COM exceptions, 476 data management, 195–204 components, C++ implementation, 498–501 fi lesystem access, 190–195 design principles, 68–69 scrolling, 213–217 environment, 69–70 Windows 8 Animation Library, 222–227 exceptions, 476 zooming, 213–217 File Open Picker, 150–153 layers, 65 GPS (Global Positioning System), 78 architecture layers, 66–67 HTML5 applications, 188 lifecycle events, debugging, 532 WinJS (Windows Library for JavaScript), lifecycle states, 314–315 188–189 changes, 315–316 Language Projections layer, 76–78 events, 316–322 metadata, 70–71 logo on splash screen, 347–349 COM (component object model), 71 logos, size, 348 DLLs (Dynamic Link Libraries), 71 message dialog boxes, 337 fi les, 72–74 adding to apps, 338–340 format, 71–72 multiple at once, 47–48 IDL (Interface Defi nition Language), 71 navigation models, 124–131 namespaces, 75–76 packages, 323–325 .NET Framework, 71 application package manifest, 326 .NET Framework 4.5, 81–82 Package.appxmanifest, 326–327 overview, 67–68 pages, 125 Windows services, 502–503 detail page, 127 Windows Store, 83 hub pages, 125–127 advertisements, 547 persisting data, 342 app details, 542–543 application data stores, 343 application certifi cation, 553

596

012680bindex.indd 596 8/26/12 2:55 PM Windows XP – zooming

in-app purchases, 545–547 WPF/E (WPF Everywhere), 233 LicensingInformation, 550 Write method, 140, 141 ListingInformation, 550 writeBufferAsync method, 190 overview, 541–542 writeBytesAsync method, 190 registration, 550–551 writeLinesAsync method, 190 submitting apps, 551–552 writeTextAsync function, 163, 195 trial mode, 548–550 writeTextAsync method, 190 uploading apps, 543 free trial periods, 544 full-featured, 544 X trial versions, 544–545 Windows App Certifi cation Kit, 553–554 XAML (eXtensible Application Markup Windows XP, 5 Language), 17 Windows.ApplicationModel.Background attached properties, 238–239 namespace, 507 attribute syntax, 233 Windows.ApplicationModel.Contacts C++ for Windows 8 applications, 471 namespace, 399 dependency properties, 238 Windows.ApplicationModel.Store. gradient stops, 233 CurrentApp, 544–545 Hello World, 17–18 Windows.Devices.Geolocation layout management system, 237–248 namespace, 433 markup extensions, 234 Windows.Devices.Input namespace, 516 namespaces, GreetMe application, 234–237 Windows.Devices.Sensors namespace, 448 Panel class, 238 Windows.Networking.Connectivity property syntax, 233 namespace, 412 resources Windows.Storage namespace, FileIO class, 190 hierarchy, 249 Windows.Storage.Pickers namespace referencing, 248 FileOpenPicker class, 190 ResourceDictionary fi les, 249 FileSavePicker class, 190 system resources, 250 Windows.UI.ApplicationSettings namespace, using, 250–251 340–341 UI (user interface) and, 232–234 Windows.UI.Popups.MessageDialog class, 153 Xerox PARC, 122 Windows.Web.Syndication namespace, 415 XML (eXtensble Markup Language), 17 WinJS (Windows Library for JavaScript), 188–189 feeds, 415 WinJS.Binding namespace, 196 xmlns:prefix attribute, 234 WinJS.Binding.Template, 201 WinJS.UI.ListView, 212 WinJS.UI.processAll( ) function, 159, X–Y–Z 194, 197 zooming, 213–217 WinRT Component DLL, 479 semantic zoom, 361 WPF (Windows Presentation Foundation), 17, SemanticZoom control, 305–306 18–19, 232–233 data binding, 19

597

012680bindex.indd 597 8/26/12 2:55 PM