1426 professional visual basic 2012 and NET 4 5 programming

916 68 0
  • Loading ...
    Loading ...
    Loading ...

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Tài liệu liên quan

Thông tin tài liệu

Ngày đăng: 06/03/2019, 10:53

www.it-ebooks.info Book Title V1 - MM/DD/2010 www.it-ebooks.info ffirs.indd ii 12/7/2012 3:55:05 PM Book Title V1 - MM/DD/2010 PROFESSIONAL VISUAL BASIC® 2012 AND NET 4.5 PROGRAMMING INTRODUCTION xxxi PART I LANGUAGE CONSTRUCTS AND ENVIRONMENT CHAPTER Visual Studio 2012 CHAPTER The Common Language Runtime 57 CHAPTER Objects and Visual Basic 103 CHAPTER Custom Objects 179 CHAPTER Advanced Language Constructs 237 CHAPTER Exception Handling and Debugging 263 PART II BUSINESS OBJECTS AND DATA ACCESS CHAPTER Arrays, Collections, and Generics 281 CHAPTER Using XML with Visual Basic 315 CHAPTER ADO.NET and LINQ 369 CHAPTER 10 Data Access with the Entity Framework 407 CHAPTER 11 Services (XML/WCF) 429 PART III SPECIALIZED TOPICS AND LIBRARIES CHAPTER 12 XAML Essentials 465 CHAPTER 13 Creating XAML Applications for Windows 517 CHAPTER 14 Applications with ASP.NET, MVC, JavaScript, and HTML 561 CHAPTER 15 Localization 645 CHAPTER 16 Application Services 667 CHAPTER 17 Assemblies and Reflection 693 CHAPTER 18 Security in the NET Framework 719 CHAPTER 19 Parallel Programming Using Tasks and Threads 757 CHAPTER 20 Deploying XAML Applications via the Windows Windows Store 815 INDEX 833 www.it-ebooks.info ffirs.indd i 12/7/2012 3:55:04 PM Book Title V1 - MM/DD/2010 www.it-ebooks.info ffirs.indd ii 12/7/2012 3:55:05 PM 010 Book Title V1 - MM/DD/2010 PROFESSIONAL Visual Basic® 2012 and NET 4.5 Programming www.it-ebooks.info ffirs.indd iii 12/7/2012 3:55:05 PM Book Title V1 - MM/DD/2010 Page iv www.it-ebooks.info ffirs.indd iv 12/7/2012 3:55:05 PM Book Title V1 - MM/DD/2010 PROFESSIONAL Visual Basic® 2012 and NET 4.5 Programming Bill Sheldon Billy Hollis Rob Windsor David McCarter Gastón C Hillar Todd Herman www.it-ebooks.info ffirs.indd v 12/7/2012 3:55:05 PM Book Title V1 - MM/DD/2010 Professional Visual Basic® 2012 and NET 4.5 Programming Published by John Wiley & Sons, Inc 10475 Crosspoint Boulevard Indianapolis, IN 46256 www.wiley.com Copyright © 2013 by John Wiley & Sons, Inc., Indianapolis, Indiana Published simultaneously in Canada ISBN: 978-1-118-31445-6 ISBN: 978-1-118-33213-9 (ebk) ISBN: 978-1-118-33542-0 (ebk) ISBN: 978-1-118-39638-4 (ebk) Manufactured in the United States of America 10 No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600 Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at http://www.wiley.com/go/permissions Limit of Liability/Disclaimer of Warranty: The publisher and the author make no representations or warranties with respect to the accuracy or completeness of the contents of this work and specifically disclaim all warranties, including without limitation warranties of fitness for a particular purpose No warranty may be created or extended by sales or promotional materials The advice and strategies contained herein may not be suitable for every situation This work is sold with the understanding that the publisher is not engaged in rendering legal, accounting, or other professional services If professional assistance is required, the services of a competent professional person should be sought Neither the publisher nor the author shall be liable for damages arising herefrom The fact that an organization or Web site is referred to in this work as a citation and/or a potential source of further information does not mean that the author or the publisher endorses the information the organization or Web site may provide or recommendations it may make Further, readers should be aware that Internet Web sites listed in this work may have changed or disappeared between when this work was written and when it is read For general information on our other products and services please contact our Customer Care Department within the United States at (877) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002 Wiley publishes in a variety of print and electronic formats and by print-on-demand Some material included with standard print versions of this book may not be included in e-books or in print-on-demand If this book refers to media such as a CD or DVD that is not included in the version you purchased, you may download this material at http://booksupport.wiley.com For more information about Wiley products, visit www.wiley.com Library of Congress Control Number: 2012946061 Trademarks: Wiley, the Wiley logo, Wrox, the Wrox logo, Wrox Programmer to Programmer, and related trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc and/or its affi liates, in the United States and other countries, and may not be used without written permission Visual Basic is a registered trademark of Microsoft Corporation All other trademarks are the property of their respective owners John Wiley & Sons, Inc., is not associated with any product or vendor mentioned in this book www.it-ebooks.info ffirs.indd vi 12/7/2012 3:55:08 PM 010 Book Title V1 - MM/DD/2010 This book is dedicated to Tracie, Billy, and Johnny, who had to put up with me locking myself away in my home office and not spending as much time with them as I'd like and they deserved —Bill Sheldon I’d like to dedicate this book to those in the software development community who put users first I’ve watched with regret as our profession has become inwardly focused, worrying far more about technology and process than what we can accomplish for our users and the businesses for which they work I salute those who invest the time and effort to deliver compelling and wonderful experiences to their users, and I hope the material I contributed to this book will help them that —Billy Hollis This book is dedicated to you, the reader Unless you didn’t pay for the book—in that case it’s dedicated to my Mom (love ya, Mom) —Rob Windsor To my son, Kevin —Gastón C Hillar For my wife, Amy Thank you for your support while I worked on this project I must also thank my son, Aidan, and daughter, Alaina, for their support and understanding while I was busy in my office rather than spending time with them I love all of you Thank you —Todd Herman www.it-ebooks.info ffirs.indd vii 12/7/2012 3:55:09 PM Book Title V1 - MM/DD/2010 Page viii www.it-ebooks.info ffirs.indd viii 12/7/2012 3:55:09 PM Short – SqlCommand Short, 113, 119, 120 ShowXmlNode, 331–332 SID See Security Identifier side-by-side execution, 704 side-by-side versioning, 64 side-loading, 817, 828–830 signaling, 806 signatures, 162–163 SignCode.exe, 721 signing applications, 736–737, 829 signing assemblies, 698–700 Signing tab, 27 Silverlight, 13, 60, 465, 466 application templates, 551 binding expressions, 492 ItemContainer style, 513 ListBox, 499, 504 measurement units, 472 namespaces, 471 simple data binding, 575–580 Simple Object Access Protocol See SOAP Single, 113, 117, 121–122 single-level inheritance, 199 SingleLinkedList, 300–303 SiteMapDataSource, 581 Slider, 470 smallint, 120 Smalltalk, 199 snapped application windows, 479 snapped views, 522–523 sn.exe, 698 Sn.exe, 737 SOA See service-oriented architecture SOAP, 316, 324, 430, 444 WCF, 433–434 SOAP Contract Language, 324 SOAP Discovery, 324 SOAP services, 625 SOAP Toolkit, 431 software publisher, 727 Software Publisher Certificate (SPC), 737 software threads, 788 SolidColorBrush, 486–487 Solution Explorer, 14–15, 28, 414 adding service references, 445–447, 456–457 MVC projects, 604 Web Forms, 565–566 Windows Style apps, 639, 641 WSDL files, 459 SortedList, 287 sorting, cultural differences, 656–658 Source Code Style attributes, 322–326 source listing, Source property, 270–271, 493–494 SourceExists method, 274 Spaanjaars, Imar, 586 spaghetti code, 199 SPC See Software Publisher Certificate specific culture defi nition, 647, 662 Split App, 552 Split method, 128 SQL, 370 bigint value, 120 inserting data, 373–374 Integer value, 120 smallint value, 120 stored procedures, 372 SQL command string deleting data, 375–376 inserting data, 374 updating data, 375 SQL Server, 22, 53, 315, 369, 370, 373 asynchronous calls, 387–388 NET data providers, 380, 394 query compilation, 382 Service Manager, 683 stored procedures, 382 Windows Services, 668 SQL Server Enterprise Manager, 383 SQL Server Express, 591 SQL Server Management Studio, 383 SqlCommand, 373, 386, 391–392 asynchronous call options, 387 860 www.it-ebooks.info bindex.indd 860 12/7/2012 3:56:44 PM SqlConnection – SubString method SqlConnection, 373, 380, 381, 401 calling stored procedure, 384 SqlDataAdapter, 390 SqlDataReader, 384, 386, 389 SqlDataSource, 361, 581 SqlParameter, 392 square tiles, 557 SSL See Secure Sockets Layer stack, 110–111, 282 concurrent, 807–809 Stack, 287 StackPanel, 468, 469, 473, 479, 483, 510 StackTrace property, 270–271 Standard Generalized Markup Language (SGML), 316 StandardStyles.xaml, 555–556 Start, 684 StartPending, 684 startup settings, 707 Static keyword, 10 static values, 787 static variables, 165 static XML documents, 349–350 Status, 684, 791 Step-In, 48–49 Step-Out, 48–49 Step-Over, 48–49 Stop, 684, 782 Stopped, 684 StopPending, 684 Storeadm.exe, 737 stored procedures, 372 calling, 384–385 Command object, 382–385 creating, 383–384 in DataAdapter objects, 391–392 StorePermission, 725 StorePermissionAttribute, 725 Stream, 320, 337, 357 streams reading XML, 329–337 writing XML, 326–329 stream-style parsers, 324–337 StreamWriter, 276–277 String, 112, 113, 337 String(), 126–127 String class, 125, 126–130 string comparison, 19 string constants, 130 StringBuilder, 23, 81, 88, 111, 292 editable strings, 129–130 strings connection, 380–381 converting, 170 editing, 129–130 immutable class, 128–130 manipulating, 128 passing to services, 688–689 String.Split method, 128 strong names, 698–700, 701, 726, 728, 737 StrongNameIdentityPermission, 726 StrongNameIdentityPermission Attribute, 726 StrongNamePublicKeyBlob, 726 Structure, 306 structure constraints, 310 styles BasedOn, 512 defi ning, 510–511 implicit, 512 ItemContainer, 512–513 scope, 511 XAML, 466, 510–513 Sub, 6, Async use with, 248 subclass, 184–186 subclassing, 104, 182 subroutines lamda expressions, 241–242 reading XML streams, 331 SubSonic, 408 SubString method, 127 861 www.it-ebooks.info bindex.indd 861 12/7/2012 3:56:44 PM superclass – System.Xml superclass, 182 SymEnc, 747 SymKey, 747 symmetric encryption, 740, 753 symmetric key encryption, 744–747 SymmetricAlgorithm, 744–747 synchronization primitives, 806 synchronization problems, 806–807 syntax, 5–10 syntax checking, 136 system activity loggers, 668 System Event Log, 96, 273 System namespace, 83 references, 23 System.AggregateException, 784 System.Array, 282 System.Collections, 286–287 System.Collections library, 83, 87–88, 657 System.Collections.Concurrent, 776, 807 System.Collections.Concurrent Partitioner, 775 System.Collections.Generic, 657 System.ComponentModel.BindingList, 297 System.Configuration.Install Installer, 671 System.Convert, 140 System.Data, 377 System.Data.Common, 377 System.Data.EntityClient, 377 System.Data.Linq, 377 System.Data.Odbc, 377 System.Data.OleDb, 377 System.Data.Services, 377 System.Data.SqlClient, 377 System.Data.SqlTypes, 377 System.Diagnostics, 274 System.DirectoryServices, 83 System.Drawing, 111 System.Environment.ProcessorCount, 778 System.Exception, 264–265 System.IO, 731 System.Linq.ParallelEnumerable, 811–812 System.Net.Http, 254 System.Object, 8, 108–109, 193, 203 System.Reflection, 231–232 System.Security.Cryptography, 751 System.Security.Cryptography AesManaged, 765 System.Security.Cryptography.MD5, 765 System.Security.Cryptography.Xml, 751 System.Security.Permissions, 720, 723–731, 729 System.Security.Principal, 729 System.ServiceModel, 441 System.ServiceProcess, 683 System.ServiceProcess.ServiceBase, 671 System.ServiceProcess ServiceInstaller, 671 System.ServiceProcess ServiceProcessInstaller, 671 System.Text, 23, 82 System.Threading.CancellationToken, 798 System.Threading.Tasks, 758 System.Threading.Tasks.Parallel, 758–759 System.Threading.Tasks.Task, 790–791 System.Transactions, 403 System.Windows.MessageBox, 42 System.Xml, 316, 325 document support, 324–342 DOM-based documents, 325 DOM-specific classes, 338 stream-based documents, 324 XmlReader, 326 862 www.it-ebooks.info bindex.indd 862 12/7/2012 3:56:45 PM System.Xml.Linq – TextBox XmlWriter, 326–329 System.Xml.Linq, 316, 342, 343 SystemXml.Query.XsltCommand, 354 System.Xml.Schema, 316 System.Xml.Serialization, 316, 318–319, 323 System.Xml.XmlException, 337 System.Xml.XPath, 316 System.Xml.Xsl, 316, 326 classes and interfaces, 360–361 System.Xml.Xsl XslCompiledTransform, 356–357 System.ServiceProcess ServiceController, 674 T TabNavigation, 539 Tabular Data Stream (TDS), 394 Target CPU, 18 Task, 790 Task List, 52–53 Task Parallel Library (TPL), 758 concurrent collections, 807 data structures, 805 debugging, 764 execution order, 762 load-balancing, 779 synchronization, 805–807 TaskFactory, 791 TaskFactory.StartNew, 803 tasks canceling, 798–801 chaining with continuations, 805 creating and managing, 788–813 exception handling, 801–802 initial states, 791 life cycle, 791–792 long running, 804 parallelizing code with, 793–802 parent, 804 returning values, 802–805 starting, 793–794 threads and, 788–790 waiting for fi nish, 797–798 TaskScheduler, 788 TaskStatus, 791 TaskStatus.Canceled, 792, 798 TaskStatus.Created, 791 TaskStatus.Faulted, 792 TaskStatus.RanToCompletion, 792 791 TaskStatus WaitingForChildrenToComplete, 792 namespace, 776 task parallelism, 758 task schedulers, 790, 795, 804 TaskCanceledException, 800 TaskCreationOptions, 790, 804–805 TaskCreationOptions AttachedToParent, 804 TaskCreationOptions.LongRunning, 804 804 TaskStatus.WaitingForActivation, System.Collections.Concurrent TaskCreationOptions.None, 804 TaskCreationOptions.PreferFairness, TaskStatus.WaitingToRun, 791 Task.WaitAll, 797–798 TDS See Tabular Data Stream Team Foundation Server, 53 tear-away tabs, 29 Templates, 639 Terminal Session services, 672 Test projects, 13 text editor, customizing, 30–31 TextBlock, 470, 497 TextBox, 188 TextBox, 185, 470, 473, 492–493, 495–496 863 www.it-ebooks.info bindex.indd 863 12/7/2012 3:56:45 PM TextBox Helper – types ASP.NET, 575 model binding, 485–486 TextBox Helper, 598 TextReader, 320 TextWriter, 276, 320, 337, 357 TextWriterTraceListener, 276–277 then, 640 thousands separators, 654–655 thread pool engine, 790 threads cultures, 647–649 main, 793 tasks and, 788–790 TPL, 788 thread-safe collections, 807 Thread.Sleep, 291 Throw, 265, 267–268 ThrowIfCancellationRequested, 798, 800 Tick event, 244 TileBrush, 487 TileTemplateImage, 557 TimeOutException, 784 Timespan, 129 TimeSpan, 118 TLS See Transport Layer Security Today, 124 TODO keyword, 53, 77 ToggleSwitch, 544 tokens, task canceling, 798–801 ToolTips, 35 debug, 47 localization, 660 ToString, 205 ToString method, 125, 203 touch conventions, 520 touch functionality GridView, 534, 535 ListView, 533, 535 touch input, 822 TPL See Task Parallel Library Trace listeners, 275–278 Trace object, 275–278 transactions, 403–406 creating, 403–405 explicit, 403–404 implicit, 403–405 resource managers, 405–406 TransactionScope, 404–405 Transform properties, 549 TransformFile, 365 translucent elements, 487 Transport Layer Security (TLS), 753 TripleDESCryptoServiceProvider, 744 Try, 265–267 TryCast, 142–143 Try-Catch statements, 140 TryDequeue, 809 TryParse, 139, 140–141 TryPop, 809–810 TryUpdateModel, 584 T-SQL, 22 Type class, 710, 711–713 type constraints, 308–310 type conversion, 19, 171 explicit, 137–143 implicit, 119, 137–138 methods, 139–140 type inference, 19 type metadata, 62, 694 type methods, 66 TypeDescriptorPermission, 726 TypeDescriptorPermissionAttribute, 726 TypeLoadException, 706 types, 61–62 Byte, 123–124 casting, 336 Char, 123–124 DateTime, 124–125 decimal, 121–123 fi nding in assembly, 711–712 864 www.it-ebooks.info bindex.indd 864 12/7/2012 3:56:45 PM UAC – version policies fi nding members, 712–713 generic, 294, 295–298, 300–307 integer, 119–120 lazy initialization, 805 nullable, 294–295 Object class as basis, 125 parameters, 300, 304, 310 primitive, 112–114 reference, 109–112, 125–131, 291 System.Object, 193 value, 109–112, 117–125 working with, 109–114 XML, 336 updating pipeline, 828 UrlIdentityPermission, 726 UrlIdentityPermissionAttribute, 726 User Access Control (UAC), 721, 730, 734 application settings, 735–739 User account, 670 UserControl, 467–468, 474 Using, 327 UtcNow, 124 V U UAC See User Access Control UBound, 285–286 UI conventions, Windows 8, 520–521 uiAccess setting, 736 uiCulture attribute, 649, 659 UIElement, 469, 484 UInt16, 119, 120 UInt32, 119, 120 UInt64, 119, 121 UIPermission, 726 UIPermissionAttribute, 726 UI/UX guidelines early Windows versions, 821 Windows 8, 522–524, 821 UML See Unified Modeling Language unary operators, 170, 171 UNDONE keyword, 53 Unicode, 123 Unified Modeling Language (UML), 181 unified programming model, 371 Universal Coordinated Time, 124 unmanaged code, 22 unmanaged heap, 78 UpdateCommand, 390 validation client-side web development, 638 helpers, 600–602 Web Forms, 585–586 ValidationMessageFor helper, 622 ValidationSummary Html Helper, 600 value converter, 494–497, 555 value types, 109–112, 117–125 values and behaviors, translating, 652–658 ValueType, 300–301 variable scope, 133–134, 209–211 variables declaration, 19 global, 133 initializing, 208–209 instance, 107–108 loop control, 288 member, 107, 133 method, 133 shared, 165–166 static, 165 System.Object, 193 types, 19 vbCRLF, 118 ver directive, 700–701 VeriSign, 751 version numbers, 64–65, 698 version policies, 704–706 865 www.it-ebooks.info bindex.indd 865 12/7/2012 3:56:45 PM versioning – Web API versioning, 64, 703–709 application isolation, 703–704 configuration fi les, 706–709 runtime settings, 707–709 self-describing components, 704 side-by-side execution, 704 startup settings, 707 version policies, 704–706 VerticalAlignment, 482–483 VerticalAlignment, 476 VideoBrush, 487 View Designer, 28 ViewData, 610 views ASP.NET MVC, 609–613 scaffolding, 616 strongly typed, 610–612, 615, 618 ViewState, 571, 739 virtual class, 215 virtual methods, 191–194 VirtualizingStackPanel, 510 Visual Basic, 3–4 compiler versions, component-based concepts, 105 creating Windows Service in, 675–676 keywords and syntax, 5–10 multiple inheritance, 198–199 object-oriented concepts, 104 operators, 171 parallel code, 764–769 transaction support, 403–406 Visual Basic Unit Test project, 13 Visual Studio 2012, 3, 4–5 animation support, 549–551 app deployment to Windows Store, 827–828 app package creation, 825–826 application templates, 551–556 ASP.NET support, 562–563 checking app requirements, 826–827 Class Designer, 181 customizations, 30–31 features, 52–56 Mapping Details pane, 419, 422 Model Browser, 412–413 Multilingual App Toolkit, 663 property categories, 548–549 running as Administrator, 736 settings file, 52 side-loading, 828–830 Start Screen, 11 Store menu, 824–825 Transform properties, 549 Ultimate, 46–47 versions, 5, 46–47 visual designer changes, 547–551 WCF Service support, 446, 450 Windows Store, 823–828 XML literal support, 348 Visual Studio host, 23 Visual Studio NET, 4–5 stored procedure creation, 383 Visual Studio Team Suite, 13 Visual Studio Toolbox, 31–33 Visual Studio Tools for Office (VSTO), 13 visualizers, 48 VisualStateManager, 515 W W3C Extensible Markup Language (XML) 1.0 specification, 326 WAS See Windows Activation Service; Windows Process Activation Service Watch windows, 51 WCF See Windows Communication Foundation WCF projects, 13 WCF services, 431–432 Web API, 561, 625–628 controllers, 626–627 MVC architecture, 626 REST services, 625–628 866 www.it-ebooks.info bindex.indd 866 12/7/2012 3:56:45 PM web development – Windows 2000 Component Services web development, client-side, 624–638 Web Forms, 93, 563–586 control events, 569–571 creating project, 563–564 data source controls, 580–581 event-driven model, 569 master and content pages, 571–575 model binding, 581–584 page events, 568–569 pages, 565–566 server controls, 567–568 simple data binding, 575–580 validation, 585–586 ViewState, 571 Web Pages, 561, 586–602 database access, 591–593 forms, 596–599 Helpers, 594 layout pages, 591 passing information between pages, 595–596 Razor view engine markup, 588–590 user input, 599–600 validation, 600–602 Web Part projects, 13 Web projects, 13 Web services, 430–432, 625 cryptography, 720 jQuery calls, 630 Web Services Description Language (WSDL), 430 WebBrowserPermission, 726 WebBrowserPermissionAttribute, 726 WebClient class, 252 WebGrid helper, 594 WebMatrix, 586 WebView, 545 Where method, 246 While, 290–291 wide tiles, 557 widening conversion, 170 Win32OwnProcess, 684 Win32ShareProcess, 684 winControl, 640 win-data-bind attribute, 639 Window, 467 Windows 7, 730, 734, 736 Windows 8, 13, 59, 465, 466 app certification requirements, 821–823 app interaction with OS, 522 application deployment options, 815–817 application templates for, 551–556 binding expressions, 492 DataTemplateSelector, 539–542 elements with new usage, 545–547 FlipView, 528 Frame, 545–546 gestures, 533 GridView, 528 HTML and JavaScript apps, 638–644 ItemContainer style, 513 ListBox, 504 ListView, 499, 528, 639–641 live tiles, 557 namespaces, 471 new visual elements, 524–547 pickers, 542 PopUp, 546–547 root visual element, 520 sizing and layout guidelines, 523–524 snapped application windows, 479 start menu, 557 typeface and font guidelines, 523 UI conventions, 520–521 UI/UX guidelines, 522–524 Windows Services, 669 XAML differences, 518–520 Windows ARM Edition, 830 Windows Enterprise Edition, 830 Windows Style apps, 642–644 Windows Store requirements, 821–823 Windows 2000 Component Services, 394 867 www.it-ebooks.info bindex.indd 867 12/7/2012 3:56:45 PM Windows Activation Service – Windows Services Windows Activation Service (WAS), 439 Windows API, 65 Windows App Certification Kit, 826–827, 829 Windows Communication Foundation (WCF), 4, 13, 59, 429–430 adding service references, 445–447, 456–457 ASP.NET Web Service messages, 434 bindings for, 441 building consumers, 445–453, 456–458 building services, 436–444, 456 capabilities, 433–434 configuration fi les, 449–450 consumption code, 451–453 contracts, 434 creating interface, 437–438 data contracts, 453–455 hosting services in console application, 439–443, 456 interface defi nitions, 454 metadata, 434 new project templates, 436–437 utilizing interface, 438–439 Windows Services, 668 WS-* protocols, 434–436 Windows Component Services, 403 Windows Console projects, 76 Windows Event Logs, 273–274 Windows Explorer, 702 Windows File Explorer, 669 Windows Forms, 14, 32, 39, 184, 226, 227, 439, 563 Canvas, 478 events, 569 layouts, 472 list boxes, 504 My keyword, 93 reusing, 52 Windows Library for JavaScript (WinJS), 638 Windows Live, 818 Windows Live ID, 818 Windows NET applications, 12 Windows NT, 668 Windows Phone, 60 Windows Presentation Foundation (WPF), 4, 12, 238, 439, 465, 466 application templates, 551 binding expressions, 492 design surface, 31–32 ItemContainer style, 513 ListBox, 499 measurement units, 472 namespaces, 471 ServiceController integration, 685 Windows Process Activation Service (WAS), 668 Windows RT, 13, 465, 735 application deployment, 701, 816–817 assembly types, 701 event logs, 274 reflection, 694 side-loading apps, 817 Windows SDK, 694 Windows Services, 667, 668 accounts, 670–671 characteristics, 669 communicating with, 683–686 creating, 671–675 creating in Visual Basic, 675–676 creating solution, 677 custom commands, 686–688 debugging, 689–691 IIS control, 686 indexing, 668 installing, 680–681 interfacing with, 669–671 multiple services per executable, 674 NET components, 677–680 NET Framework classes, 671–674 other types, 674–675 passing strings, 688–689 868 www.it-ebooks.info bindex.indd 868 12/7/2012 3:56:46 PM Windows Store – XAML starting, 681 uninstalling, 682 Windows 8, 669 Windows Store account registration, 818–819 account types, 818 app deployment, 827–828 app package creation for, 825–826 app requirements, 821–823, 826–827 configuring account type, 819 demographic information, 820 developer agreement, 820 developer license, 817 getting account, 817–821 publisher name, 820 registration codes and fees, 820–821 screenshot capture for, 825 Visual Studio 2012, 823–828 WinRT app deployment, 816–817 working with, 817 Windows Store applications, 12, 638 access permissions, 722–723 deployment, 701 localization, 663–664 security, 722–723 UAC settings, 735–739 Windows Store Dev Center, 824 Windows Store projects, 13 Windows Vista, 730, 734 Windows Workflow Foundation, 4, 467 Windows Workflow Foundation (WF), 13 WindowsPrincipal, 730 WinJS See Windows Library for JavaScript WinJS controls, 639 WinJS.Binding.List, 640 With keyword, 186 WithEvents keyword, 154, 156–158 work scheduling, 789–790 work stealing, 795 work-stealing queues, 789 WPF See Windows Presentation Foundation WPF Application, 14 project template, 14 WriteAttributeString, 328 WriteBinHex, 329 WriteCData, 329 WriteComment, 327 WriteElementString, 328 WriteEndElement, 328 WriteLine, 276 write-only properties, 151 WriteRaw, 329 WriteStartElement, 328 WriteString, 329 WriteWhiteSpace, 329 WS-* protocols, 434–436 WS-AtomicTransaction, 435 WS-Coordination, 435–436 WSDL See Web Services Description Language WSDL files data contracts, 453 namespaces, 455 reviewing, 443–444, 459–461 WCF service hosting, 441–442 WS-ReliableMessaging, 435 WS-SecureConversation, 435 WS-Security, 435–436 X X.509, 725, 737, 751–752 XAML, 31–33, 465 additional namespace referencing, 471 AppBar, 524–527 attached properties, 473–474 attribute syntax vs element syntax, 470–471 binding failures, 497 brushes, 486–488 Canvas, 478–479 child element arrangement, 481–482 869 www.it-ebooks.info bindex.indd 869 12/7/2012 3:56:46 PM XAML (continued) – XML XAML (continued) child element measurements, 480 code-behind, 468–469 collapsing unneeded elements, 496–497 colors, 486–487 common elements, 469–470 complex binding paths, 498 composition model, 466, 485 content controls, 484 content model, 485–486 control templates, 466, 513–515 controls and content, 484–488 data binding, 489–499 data templates, 466 DataContext, 492 element naming, 468–469 element sizing and layout, 479–483 FlipView, 539 gradients, 487–488 Grid, 469, 473–478 height allocation, 482 height and width properties, 480 layout system, 466, 472–483 ListBox, 501–502 ListView, GridView, and FlipView controls, 527–542 margins, 481 markup expression, 491 markup language, 466–471 measurement units, 472 minimum and maximum values, 481 nav bar, 526–527 panels, 472–479 pickers, 542–543 platforms, 466 property change notification, 494 RelativeSource property, 493–494 resources, 488–489 Source property, 493–494 styles, 466, 510–513 terminology, 469 translucent elements, 487 vertical positioning, 482–483 Windows differences, 518–520 XAML Window, 15 XAttribute, 343, 346–347 XComment, 343 xcopy, 815 XDocument, 343, 349, 351 XDR See XML Data Reduced XElement, 343–344, 353 xhr, 640 XLIFF localization interchange files, 664 XML, 315 ADO.NET data sets, 370 ASP.NET, 361–367 attributes, 322–326, 346–347 deserialization, 320–322 DOM traversing, 338–340 DOM-style parsers, 325, 337–342 dynamic documents, 350–351 encoding, 739 IntelliSense support, 348 introduction, 316–318 LINQ helper objects, 343–347 LINQ literals, 347–349 LINQ querying documents, 349–351 LINQ reading, 351–352 LINQ to, 342–354 LINQ writing, 353–354 namespaces, 324 reading stream, 329–337 schemas, 324 serialization, 318–322 Source Code Style attributes, 322–326 static documents, 349–350 stream-style parsers, 324–337 traversing with XmlReader, 334–336 types, 336 UAC settings, 735 Web service interfaces, 430 writing stream, 326–329 870 www.it-ebooks.info bindex.indd 870 12/7/2012 3:56:46 PM XML comments – ZoneIdentityPermissionAttribute writing with DOM, 340–342 XSLT transform between standards, 357–360 XML comments, 34 XML Data Reduced (XDR), 316 XML literals, 347–349 XML Path language See XPath Xml server control, 366–367 XML Transformation (XSLT) See XSLT XmlAttribute, 338 XmlDataSource, 581 namespace problem, 365–366 server control, 361–365 XmlDocument, 337, 338, 340–341 XmlElement, 338 XmlException, 337 XmlNameTable, 326 XmlNode, 338–340 XmlNodeList, 339 XmlNodeType.WhiteSpace, 332 xmlns, 471 XmlReader, 255, 320, 326, 329–337, 357 traversing XML, 334–336 XmlReaderSettings, 330, 333–334 XmlResolver, 326, 356–357 XmlSerializer, 318–320, 322 XmlSerializerNamespaces, 320 XmlTextReader, 329 XmlWriter, 320, 326–329, 337, 357 XmlWriterSettings, 327, 329 XNamespace, 343, 344–346 Xor operator, 171 XPath, 316, 363, 365 XPathNavigator, 357 XQuery, 324 XSD, 369, 395, 453, 459 XSL, 316 XSL Transformations See XSLT XslCompiledTransform, 356–357 XSLT, 316, 324, 354–361 attributes, 359 elements, 354, 358, 359 for-each, 359 loading, 357 methods, 356–357 transforming XML standards, 357–360 XmlDataSource namespace problem, 365–366 XsltArgumentList, 357, 360 XsltCommand, 354 XsltCompileException, 361 XsltContext, 360 XsltException, 361 XslTransform, 326, 360 Y Yield, 256, 257 Z zero-impact deployment, 704 ZoneIdentityPermission, 726 ZoneIdentityPermissionAttribute, 726 871 www.it-ebooks.info bindex.indd 871 12/7/2012 3:56:46 PM Try Safari Books Online FREE for 15 days and take 15% off for up to Months* Gain unlimited subscription access to thousands of books and videos With Safari Books Online, learn without limits from thousands of technology, digital media and professional development books and videos from hundreds of leading publishers With a monthly or annual unlimited access subscription, you get: • Anytime, anywhere mobile access with Safari To Go apps for iPad, iPhone and Android • Hundreds of expert-led instructional videos on today’s hottest topics • Sample code to help accelerate a wide variety of software projects • Robust organizing features including favorites, highlights, tags, notes, mash-ups and more • Rough Cuts pre-published manuscripts START YOUR FREE TRIAL TODAY! Visit: www.safaribooksonline.com/wrox *Discount applies to new Safari Library subscribers only and is valid for the first consecutive monthly billing cycles Safari Library is not available in all countries www.it-ebooks.info badvert.colour.indd 10/30/2012 4:43:26 PM www.it-ebooks.info Related Wrox Books Beginning ASP.NET 4.5 in C# and VB ISBN: 978-1-118-31180-6 Featuring a user-friendly, step-by-step format, the book guides you through customizing the IDE, building a Planet Wrox website example, working with files and web forms, designing web pages, displaying and updating data, creating tables, and much more With this resource in hand, you will be completely at ease learning ASP.NET 4.5 Beginning Microsoft Visual C# 2012 Programming ISBN: 978-1-118-31441-8 Using this book, you will first cover the fundamentals such as variables, flow control, and object-oriented programming and gradually build your skills for web and Windows programming, Windows forms, and data access Step-by-step directions walk you through processes and invite you to “Try it Out,” at every stage By the end, you’ll be able to write useful programming code following the steps you’ve learned in this thorough, practical book If you’ve always wanted to master Visual C# programming, this book is the perfect one-stop resource Ivor Horton’s Beginning Visual C++ 2012 ISBN: 978-1-118-36808-4 Offering a comprehensive introduction to both the standard C++ language and to Visual C++, Ivor Horton offers step-by-step programming exercises, examples, and solutions to deftly guide novice programmers through the ins and outs of C++ development Professional Visual Studio 2012 ISBN: 978-1-118-33770-7 This book is what you need to get up and running quickly on Visual Studio 2012 Written by a Microsoft Visual C# MVP, it guides you through the integrated development environment (IDE), showing you how to maximize each of the tools and features Visual Basic 2012 Programmer’s Reference ISBN: 978-1-118-31407-4 Visual Basic 2012 is packed with powerful features and this book will help you master them all You’ll gain a solid understanding of essential Visual Basic topics and begin applying the information to perform a host of important development tasks The tutorials inside are filled with code examples and the best methods for using them to write your own programs www.it-ebooks.info ... Changes to the Visual Designer in Visual Studio 2012 Better Resource Selector Common vs Advanced Property Categories 52 2 52 2 52 2 52 3 52 3 5 24 5 24 52 7 54 2 54 3 54 4 54 4 54 5 54 7 54 7 54 8 xxv www.it-ebooks.info... Consumer Looking at WSDL and the Schema for HelloCustomerService Summary 44 5 44 7 44 9 45 1 45 3 45 5 45 6 45 6 45 9 46 1 xxiii www.it-ebooks.info ftoc.indd xxiii 12/7 /2012 3 :55 :59 PM Book Title
- Xem thêm -

Xem thêm: 1426 professional visual basic 2012 and NET 4 5 programming , 1426 professional visual basic 2012 and NET 4 5 programming , .NET 4.5 Portable Class Library, Property Setting: Attribute Syntax vs. Element Syntax, Chapter 14: Applications with ASP.NET, MVC, JavaScript, and HTML

Mục lục

Xem thêm