Details

Beginning Visual C# 2010


Beginning Visual C# 2010


1. Aufl.

von: Karli Watson, Christian Nagel, Jacob Hammer Pedersen, Jon D. Reid, Morgan Skinner

28,99 €

Verlag: Wiley
Format: EPUB
Veröffentl.: 08.02.2011
ISBN/EAN: 9781118057193
Sprache: englisch
Anzahl Seiten: 1080

DRM-geschütztes eBook, Sie benötigen z.B. Adobe Digital Editions und eine Adobe ID zum Lesen.

Beschreibungen

<b>Update to Wrox's leading C# book for beginners</b> <p>Get ready for the next release of Microsoft's C# programming language with this essential Wrox beginner's guide. <i>Beginning Microsoft Visual C# 2010</i> starts with the basics and brings you thoroughly up to speed. You'll 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.</p> <p>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.</p> <ul> <li>The C# 4 programming language version will be synonymous with writing code with in C# 2010 in Visual Studio 2010, and you can use it to write Windows applications, Web apps with ASP.NET, and Windows Mobile and Embedded CE apps</li> <li>Provides step-by-step instructions for mastering topics such as variables, flow controls, and object-oriented programming before moving to Web and Windows programming and data access</li> <li>Addresses expressions, functions, debugging, error handling, classes, collections, comparisons, conversions, and more</li> </ul> <p>If you've always wanted to master Visual C# programming, this book is the perfect one-stop resource.</p> <p><b>Note:</b> CD-ROM/DVD and other supplementary materials are not included as part of eBook file.</p>
<p>Introduction xxxiii</p> <p><b>Part I: The C# Language</b></p> <p><b>Chapter 1: Introducing C# 3</b></p> <p><b>What is the .NET Framework? 3</b></p> <p>What’s in the .NET Framework? 4</p> <p>Writing Applications Using the .NET Framework 5</p> <p>CIL and JIT 5</p> <p>Assemblies 5</p> <p>Managed Code 6</p> <p>Garbage Collection 6</p> <p>Fitting It Together 7</p> <p>Linking 8</p> <p><b>What is C#? 8</b></p> <p>Applications You Can Write with C# 9</p> <p>C# in This Book 10</p> <p><b>Visual Studio 2010 10</b></p> <p>Visual Studio 2010 Express Products 11</p> <p>Solutions 11</p> <p><b>Summary 11</b></p> <p><b>Chapter 2: Writing A C# Program 13</b></p> <p><b>The Development Environments 14</b></p> <p>Visual Studio 2010 14</p> <p>Visual C# 2010 Express Edition 17</p> <p><b>Console Applications 18</b></p> <p>The Solution Explorer 22</p> <p>The Properties Window 23</p> <p>The Error List Window 23</p> <p><b>Windows Forms Applications 24</b></p> <p><b>Summary 28</b></p> <p><b>Chapter 3: Variables and Expressions 31</b></p> <p><b>Basic C# Syntax 32</b></p> <p><b>Basic C# Console Application Structure 34</b></p> <p><b>Variables 35</b></p> <p>Simple Types 36</p> <p>Variable Naming 40</p> <p>Naming Conventions 41</p> <p>Literal Values 42</p> <p>String Literals 43</p> <p>Variable Declaration and Assignment 44</p> <p><b>Expressions 45</b></p> <p>Mathematical Operators 45</p> <p>Assignment Operators 50</p> <p>Operator Precedence 51</p> <p>Namespaces 51</p> <p><b>Summary 55</b></p> <p><b>Chapter 4: Flow Control 59</b></p> <p><b>Boolean Logic 59</b></p> <p>Boolean Assignment Operators 62</p> <p>Bitwise Operators 64</p> <p>Operator Precedence Updated 68</p> <p><b>The goto Statement 68</b></p> <p><b>Branching 69</b></p> <p>The Ternary Operator 70</p> <p>The if Statement 70</p> <p>Checking More Conditions Using if Statements 73</p> <p>The switch Statement 74</p> <p><b>Looping 77</b></p> <p>do Loops 78</p> <p>while Loops 80</p> <p>for Loops 83</p> <p>Interrupting Loops 87</p> <p>Infinite Loops 88</p> <p><b>Summary 89</b></p> <p><b>Chapter 5: More About Variables 93</b></p> <p><b>Type Conversion 94</b></p> <p>Implicit Conversions 94</p> <p>Explicit Conversions 96</p> <p>Explicit Conversions Using the Convert Commands 99</p> <p><b>Complex Variable Types 102</b></p> <p>Enumerations 102</p> <p>Defining Enumerations 103</p> <p>Structs 107</p> <p>Defining Structs 107</p> <p>Arrays 110</p> <p>Declaring Arrays 110</p> <p>foreach Loops 113</p> <p>Multidimensional Arrays 113</p> <p>Arrays of Arrays 115</p> <p><b>String Manipulation 116</b></p> <p><b>Summary 121</b></p> <p><b>Chapter 6: Functions 125</b></p> <p><b>Defining and Using Functions 126</b></p> <p>Return Values 128</p> <p>Parameters 130</p> <p>Parameter Matching 132</p> <p>Parameter Arrays 132</p> <p>Reference and Value Parameters 134</p> <p>Out Parameters 136</p> <p><b>Variable Scope 137</b></p> <p>Variable Scope in Other Structures 140</p> <p>Parameters and Return Values versus Global Data 142</p> <p><b>The Main() Function 143</b></p> <p><b>Struct Functions 146</b></p> <p><b>Overloading Functions 147</b></p> <p><b>Delegates 149</b></p> <p><b>Summary 152</b></p> <p><b>Chapter 7: Debugging and Error Handling 155</b></p> <p><b>Debugging in VS and VCE 156</b></p> <p>Debugging in Nonbreak (Normal) Mode 157</p> <p>Outputting Debugging Information 158</p> <p>Tracepoints 163</p> <p>Diagnostics Output Versus Tracepoints 164</p> <p>Debugging in Break Mode 166</p> <p>Entering Break Mode 166</p> <p>Monitoring Variable Content 170</p> <p>Stepping Through Code 172</p> <p>Immediate and Command Windows 173</p> <p>The Call Stack Window 174</p> <p><b>Error Handling 175</b></p> <p>try <b><i>. . . </i></b>catch <b><i>. . . </i></b>finally 176</p> <p>Listing and Configuring Exceptions 181</p> <p>Notes on Exception Handling 182</p> <p><b>Summary 183</b></p> <p><b>Chapter 8: Introduction To Object-Oriented Programming 185</b></p> <p><b>What Is Object-Oriented Programming? 186</b></p> <p>What Is an Object? 187</p> <p>Properties and Fields 188</p> <p>Methods 189</p> <p>Everything’s an Object 189</p> <p>The Life Cycle of an Object 190</p> <p>Constructors 190</p> <p>Destructors 191</p> <p>Static and Instance Class Members 191</p> <p>Static Constructors 191</p> <p>Static Classes 192</p> <p><b>OOP Techniques 192</b></p> <p>Interfaces 193</p> <p>Disposable Objects 194</p> <p>Inheritance 194</p> <p>Polymorphism 196</p> <p>Interface Polymorphism 197</p> <p>Relationships Between Objects 198</p> <p>Containment 198</p> <p>Collections 199</p> <p>Operator Overloading 200</p> <p>Events 200</p> <p>Reference Types Versus Value Types 201</p> <p><b>OOP in Windows Applications 201</b></p> <p><b>Summary 204</b></p> <p><b>Chapter 9: Defining Classes 209</b></p> <p><b>Class Definitions in C# 209</b></p> <p>Interface Definitions 212</p> <p><b>System.Object 215</b></p> <p><b>Constructors and Destructors 217</b></p> <p>Constructor Execution Sequence 218</p> <p><b>OOP Tools in VS and VCE 222</b></p> <p>The Class View Window 222</p> <p>The Object Browser 224</p> <p>Adding Classes 226</p> <p>Class Diagrams 227</p> <p><b>Class Library Projects 229</b></p> <p><b>Interfaces Versus Abstract Classes 232</b></p> <p><b>Struct Types 235</b></p> <p><b>Shallow Copying Versus Deep Copying 237</b></p> <p><b>Summary 237</b></p> <p><b>Chapter 10: Defining Class Members 241</b></p> <p><b>Member Definitions 241</b></p> <p>Defining Fields 242</p> <p>Defining Methods 242</p> <p>Defining Properties 244</p> <p>Adding Members from a Class Diagram 249</p> <p>Adding Methods 250</p> <p>Adding Properties 251</p> <p>Adding Fields 252</p> <p>Refactoring Members 252</p> <p>Automatic Properties 253</p> <p><b>Additional Class Member Topics 253</b></p> <p>Hiding Base Class Methods 254</p> <p>Calling Overridden or Hidden Base Class Methods 255</p> <p>The this Keyword 256</p> <p>Nested Type Definitions 257</p> <p><b>Interface Implementation 257</b></p> <p>Implementing Interfaces in Classes 258</p> <p>Explicit Interface Member Implementation 260</p> <p>Adding Property Accessors with Nonpublic Accessibility 260</p> <p><b>Partial Class Definitions 261</b></p> <p><b>Partial Method Definitions 262</b></p> <p><b>Example Application 264</b></p> <p>Planning the Application 264</p> <p>The Card Class 264</p> <p>The Deck Class 265</p> <p>Writing the Class Library 265</p> <p>Adding the Suit and Rank Enumerations 266</p> <p>Adding the Card Class 268</p> <p>Adding the Deck Class 269</p> <p>A Client Application for the Class Library 272</p> <p><b>The Call Hierarchy Window 274</b></p> <p><b>Summary 275</b></p> <p><b>Chapter 11: Collections, Comparisons, and Conversions 277</b></p> <p><b>Collections 278</b></p> <p>Using Collections 278</p> <p>Defining Collections 284</p> <p>Indexers 286</p> <p>Adding a Cards Collection to CardLib 288</p> <p>Keyed Collections and IDictionary 291</p> <p>Iterators 293</p> <p>Iterators and Collections 297</p> <p>Deep Copying 299</p> <p>Adding Deep Copying to CardLib 301</p> <p><b>Comparisons 303</b></p> <p>Type Comparisons 303</p> <p>Boxing and Unboxing 303</p> <p>The is Operator 305</p> <p>Value Comparisons 308</p> <p>Operator Overloading 308</p> <p>Adding Operator Overloads to CardLib 313</p> <p>The IComparable and IComparer Interfaces 318</p> <p>Sorting Collections Using the IComparable and IComparer Interfaces 320</p> <p><b>Conversions 324</b></p> <p>Overloading Conversion Operators 324</p> <p>The as Operator 326</p> <p><b>Summary 327</b></p> <p><b>Chapter 12: Generics 331</b></p> <p><b>What Are Generics? 332</b></p> <p><b>Using Generics 333</b></p> <p>Nullable Types 333</p> <p>Operators and Nullable Types 334</p> <p>The ?? Operator 336</p> <p>The System.Collections.Generics Namespace 340</p> <p>List<b><i><</i></b>T<b><i>> </i></b>341</p> <p>Sorting and Searching Generic Lists 343</p> <p>Dictionary<b><i><</i></b>K, V<b><i>> </i></b>349</p> <p>Modifying CardLib to Use a Generic Collection Class 350</p> <p><b>Defining Generic Types 351</b></p> <p>Defining Generic Classes 351</p> <p>The default Keyword 354</p> <p>Constraining Types 354</p> <p>Inheriting from Generic Classes 361</p> <p>Generic Operators 362</p> <p>Generic Structs 363</p> <p>Defining Generic Interfaces 364</p> <p>Defining Generic Methods 364</p> <p>Defining Generic Delegates 366</p> <p><b>Variance 366</b></p> <p>Covariance 367</p> <p>Contravariance 368</p> <p><b>Summary 369</b></p> <p><b>Chapter 13: Additional OOP Techniques 373</b></p> <p><b>The :: Operator and the Global Namespace Qualifier 373</b></p> <p><b>Custom Exceptions 375</b></p> <p>Adding Custom Exceptions to CardLib 375</p> <p><b>Events 377</b></p> <p>What Is an Event? 377</p> <p>Handling Events 378</p> <p>Defining Events 380</p> <p>Multipurpose Event Handlers 385</p> <p>The EventHandler and Generic EventHandler<b><i><</i></b>T<b><i>> </i></b>Types 388</p> <p>Return Values and Event Handlers 388</p> <p>Anonymous Methods 389</p> <p><b>Expanding and Using CardLib 389</b></p> <p>A Card Game Client for CardLib 390</p> <p><b>Summary 398</b></p> <p><b>Chapter 14: C# Language Enhancements 401</b></p> <p><b>Initializers 402</b></p> <p>Object Initializers 402</p> <p>Collection Initializers 404</p> <p><b>Type Inference 407</b></p> <p><b>Anonymous Types 409</b></p> <p><b>Dynamic Lookup 413</b></p> <p>The dynamic Type 414</p> <p>IDynamicMetaObjectProvider 417</p> <p><b>Advanced Method Parameters 418</b></p> <p>Optional Parameters 418</p> <p>Optional Parameter Values 419</p> <p>Optional Parameter Order 420</p> <p>Named Parameters 420</p> <p>Named and Optional Parameter Guidelines 424</p> <p><b>Extension Methods 424</b></p> <p><b>Lambda Expressions 429</b></p> <p>Anonymous Methods Recap 429</p> <p>Lambda Expressions for Anonymous Methods 430</p> <p>Lambda Expression Parameters 434</p> <p>Lambda Expression Statement Bodies 434</p> <p>Lambda Expressions As Delegates and Expression Trees 435</p> <p>Lambda Expressions and Collections 436</p> <p><b>Summary 439</b></p> <p><b>Part II: Windows Programming</b></p> <p><b>Chapter 15: Basic Windows Programming 447</b></p> <p><b>Controls 448</b></p> <p>Properties 448</p> <p>Anchoring, Docking, and Snapping Controls 449</p> <p>Anchor and Dock Properties 450</p> <p>Events 451</p> <p><b>The Button Control 453</b></p> <p>Button Properties 453</p> <p>Button Events 453</p> <p>Adding the Event Handlers 455</p> <p><b>The Label and LinkLabel Controls 456</b></p> <p><b>The TextBox Control 457</b></p> <p>TextBox Properties 457</p> <p>TextBox Events 458</p> <p>Adding the Event Handlers 460</p> <p><b>The RadioButton and CheckBox Controls 464</b></p> <p>RadioButton Properties 465</p> <p>RadioButton Events 465</p> <p>CheckBox Properties 466</p> <p>CheckBox Events 466</p> <p>The GroupBox Control 466</p> <p><b>The RichTextBox Control 470</b></p> <p>RichTextBox Properties 470</p> <p>RichTextBox Events 472</p> <p><b>The ListBox and CheckedListBox Controls 477</b></p> <p>ListBox Properties 477</p> <p>ListBox Methods 478</p> <p>ListBox Events 478</p> <p><b>The ListView Control 481</b></p> <p>ListView Properties 481</p> <p>ListView Methods 481</p> <p>ListView Events 481</p> <p>ListViewItem 484</p> <p>ColumnHeader 484</p> <p>The ImageList Control 484</p> <p><b>The TabControl Control 491</b></p> <p>TabControl Properties 491</p> <p>Working with the TabControl 492</p> <p><b>Summary 494</b></p> <p><b>Chapter 16: Advanced Windows Forms Features 497</b></p> <p><b>Menus and Toolbars 498</b></p> <p>Two Is One 498</p> <p>Using the MenuStrip Control 498</p> <p>Creating Menus Manually 499</p> <p>Properties of the ToolStripMenuItem 501</p> <p>Adding Functionality to Menus 501</p> <p><b>Toolbars 503</b></p> <p>ToolStrip Properties 504</p> <p>ToolStrip Items 504</p> <p>Adding Event Handlers 507</p> <p>StatusStrip 509</p> <p>StatusStripStatusLabel Properties 510</p> <p><b>SDI and MDI Applications 512</b></p> <p><b>Building MDI Applications 513</b></p> <p><b>Creating Controls 522</b></p> <p>Adding Properties 524</p> <p>Adding the Event Handlers 525</p> <p>Debugging User Controls 527</p> <p>Extending the LabelTextbox Control 527</p> <p>Adding More Properties 528</p> <p>Adding More Event Handlers 529</p> <p>Adding a Custom Event Handler 529</p> <p><b>Summary 530</b></p> <p><b>Chapter 17: Deploying Windows Applications 533</b></p> <p><b>Deployment Overview 533</b></p> <p><b>ClickOnce Deployment 534</b></p> <p>Creating the ClickOnce Deployment 534</p> <p>Installing the Application with ClickOnce 543</p> <p>Creating and Using Updates of the Application 545</p> <p><b>Visual Studio Setup and Deployment Project Types 546</b></p> <p><b>Microsoft Windows Installer Architecture 547</b></p> <p>Windows Installer Terms 548</p> <p>Advantages of the Windows Installer 549</p> <p><b>Creating an Installation Package for the MDI Editor 550</b></p> <p>Planning the Installation 550</p> <p>Creating the Project 552</p> <p>Project Properties 553</p> <p>Packaging 553</p> <p>Prerequisites 554</p> <p>Setup Editors 556</p> <p>File System Editor 556</p> <p>Adding Items to Special Folders 557</p> <p>File Properties 557</p> <p>File Types Editor 559</p> <p>Create Actions 560</p> <p>Launch Condition Editor 561</p> <p>User Interface Editor 561</p> <p>Additional Dialogs 563</p> <p><b>Building the Project 565</b></p> <p><b>Installation 566</b></p> <p>Welcome 566</p> <p>Read Me 566</p> <p>License Agreement 567</p> <p>Optional Files 568</p> <p>Select Installation Folder 568</p> <p>Disk Cost 568</p> <p>Confirm Installation 569</p> <p>Progress 570</p> <p>Installation Complete 571</p> <p>Running the Application 571</p> <p>Uninstall 571</p> <p><b>Summary 571</b></p> <p><b>Part III: Web Programming</b></p> <p><b>Chapter 18: ASP.NET Web Programming 577</b></p> <p><b>Overview of Web Applications 578</b></p> <p><b>ASP.NET Runtime 578</b></p> <p><b>Creating a Simple Page 578</b></p> <p><b>Server Controls 587</b></p> <p><b>ASP.NET Postback 588</b></p> <p><b>ASP.NET AJAX Postback 593</b></p> <p><b>Input Validation 597</b></p> <p><b>State Management 600</b></p> <p>Client-Side State Management 601</p> <p>View State 601</p> <p>Cookies 602</p> <p>Server-Side State Management 603</p> <p>Session 603</p> <p>Application 605</p> <p>Cache 605</p> <p><b>Styles 606</b></p> <p><b>Master Pages 611</b></p> <p><b>Site Navigation 616</b></p> <p><b>Authentication and Authorization 619</b></p> <p>Authentication Configuration 619</p> <p>Using Security Controls 623</p> <p><b>Reading from and Writing to a SQL Server Database 626</b></p> <p><b>Summary 634</b></p> <p><b>Chapter 19: Web Services 637</b></p> <p><b>Where to Use Web Services 637</b></p> <p>A Hotel Travel Agency Application Scenario 638</p> <p>A Book Distributor Application Scenario 638</p> <p>Client Application Types 639</p> <p><b>Application Architecture 639</b></p> <p><b>Web Services Architecture 640</b></p> <p>Calling Methods and the Web Services Description Language 640</p> <p>Calling a Method 641</p> <p>WS-I Basic Profile 642</p> <p><b>Web Services and the .NET Framework 642</b></p> <p>Creating a Web Service 643</p> <p>WebService Attribute 643</p> <p>WebMethod Attribute 643</p> <p>WebServiceBinding Attribute 644</p> <p>Client 645</p> <p>SoapHttpClientProtocol 645</p> <p>Alternative Client Protocols 645</p> <p><b>Creating a Simple ASP.NET Web Service 645</b></p> <p>Adding a Web Method 648</p> <p><b>Testing the Web Service 649</b></p> <p><b>Implementing a Windows Client 649</b></p> <p><b>Calling the Service Asynchronously 655</b></p> <p><b>Implementing an ASP.NET Client 658</b></p> <p><b>Passing Data 659</b></p> <p><b>Summary 662</b></p> <p><b>Chapter 20: Deploying Web Applications 665</b></p> <p><b>Internet Information Services 665</b></p> <p><b>IIS Configuration 666</b></p> <p><b>Copying a Website 669</b></p> <p><b>Publishing a Web Application 672</b></p> <p><b>Windows Installer 675</b></p> <p>Creating a Setup Program 675</p> <p>Installing the Web Application 677</p> <p><b>Summary 678</b></p> <p><b>Part IV: Data Access</b></p> <p><b>Chapter 21: File System Data 683</b></p> <p><b>Streams 683</b></p> <p><b>The Classes for Input and Output 684</b></p> <p>The File and Directory Classes 686</p> <p>The FileInfo Class 687</p> <p>The DirectoryInfo Class 689</p> <p>Path Names and Relative Paths 690</p> <p>The FileStream Object 690</p> <p>File Position 691</p> <p>Reading Data 692</p> <p>Writing Data 695</p> <p>The StreamWriter Object 697</p> <p>The StreamReader Object 699</p> <p>Reading Data 701</p> <p>Delimited Files 702</p> <p>Reading and Writing Compressed Files 706</p> <p><b>Serialized Objects 710</b></p> <p><b>Monitoring the File System 715</b></p> <p><b>Summary 722</b></p> <p><b>Chapter 22: XML 725</b></p> <p><b>XML Documents 726</b></p> <p>XML Elements 726</p> <p>Attributes 727</p> <p>The XML Declaration 728</p> <p>Structure of an XML Document 728</p> <p>XML Namespaces 729</p> <p>Well-Formed and Valid XML 730</p> <p>Validating XML Documents 730</p> <p>DTDs 730</p> <p>Schemas 731</p> <p><b>Using XML in Your Application 734</b></p> <p>XML Document Object Model 734</p> <p>XmlDocument Class 735</p> <p>XmlElement Class 735</p> <p>Changing the Values of Nodes 739</p> <p>Selecting Nodes 744</p> <p>XPath 745</p> <p><b>Summary 749</b></p> <p><b>Chapter 23: Introduction To LINQ 753</b></p> <p><b>First LINQ Query 754</b></p> <p>Declaring a Variable for Results Using the var Keyword 756</p> <p>Specify Data Source: from Clause 756</p> <p>Specify Condition: where Clause 757</p> <p>Select Items: select Clause 757</p> <p>Finishing Up: Using the foreach Loop 757</p> <p>Deferred Query Execution 757</p> <p><b>Using the LINQ Method Syntax 758</b></p> <p>LINQ Extension Methods 758</p> <p>Query Syntax versus Method Syntax 758</p> <p><b>Ordering Query Results 760</b></p> <p><b>orderby Clause 761</b></p> <p><b>Ordering Using Method Syntax 762</b></p> <p><b>Querying a Large Data Set 764</b></p> <p><b>Aggregate Operators 766</b></p> <p><b>Querying Complex Objects 770</b></p> <p><b>Projection: Creating New Objects in Queries 774</b></p> <p><b>Projection: Method Syntax 776</b></p> <p><b>Select Distinct Query 776</b></p> <p><b>Any and All 777</b></p> <p><b>Ordering by Multiple Levels 779</b></p> <p><b>Multi-Level Ordering Method Syntax: ThenBy 781</b></p> <p><b>Group Queries 781</b></p> <p><b>Take and Skip 783</b></p> <p><b>First and FirstOrDefault 785</b></p> <p><b>Set Operators 787</b></p> <p><b>Joins 790</b></p> <p><b>Summary 791</b></p> <p><b>Chapter 24: Applying LINQ 795</b></p> <p><b>LINQ Varieties 795</b></p> <p><b>Using LINQ with Databases 796</b></p> <p><b>Installing SQL Server and the Northwind Sample Data 797</b></p> <p>Installing SQL Server Express 2008 797</p> <p>Installing the Northwind Sample Database 797</p> <p><b>First LINQ to Database Query 798</b></p> <p><b>Navigating Database Relationships 801</b></p> <p><b>Using LINQ with XML 804</b></p> <p><b>LINQ to XML Functional Constructors 804</b></p> <p>Constructing XML Element Text with Strings 808</p> <p><b>Saving and Loading an XML Document 808</b></p> <p>Loading XML from a String 811</p> <p>Contents of a Saved XML Document 811</p> <p><b>Working with XML Fragments 812</b></p> <p><b>Generating XML from Databases 814</b></p> <p><b>How to Query an XML Document 817</b></p> <p><b>Using LINQ to XML Query Members 818</b></p> <p>Elements() 818</p> <p>Descendants() 819</p> <p>Attributes() 821</p> <p><b>Summary 823</b></p> <p><b>Part V: Additional Techniques</b></p> <p><b>Chapter 25: Windows Presentation Foundation 829</b></p> <p><b>What Is WPF? 830</b></p> <p>WPF for Designers 830</p> <p>WPF for C# Developers 833</p> <p><b>Anatomy of a Basic WPF Application 834</b></p> <p><b>WPF Fundamentals 845</b></p> <p>XAML Syntax 845</p> <p>Object Element Syntax 845</p> <p>Attribute Syntax 846</p> <p>Property Element Syntax 846</p> <p>Content Syntax 847</p> <p>Mixing Property Element Syntax and Content Syntax 847</p> <p>Markup Extensions 848</p> <p>Desktop and Web Applications 848</p> <p>The Application Object 849</p> <p>Control Basics 849</p> <p>Dependency Properties 850</p> <p>Attached Properties 852</p> <p>Routed Events 852</p> <p>Attached Events 858</p> <p>Control Layout 858</p> <p>Stack Order 859</p> <p>Alignment, Margins, Padding, and Dimensions 859</p> <p>Border 860</p> <p>Canvas 860</p> <p>DockPanel 861</p> <p>Grid 863</p> <p>StackPanel 866</p> <p>WrapPanel 868</p> <p>Control Styling 868</p> <p>Styles 869</p> <p>Templates 869</p> <p>Triggers 874</p> <p>Animation 875</p> <p>Timelines without Key Frames 876</p> <p>Timelines with Key Frames 877</p> <p>Static and Dynamic Resources 878</p> <p>Static Resources 878</p> <p>Dynamic Resources 878</p> <p>Referencing Style Resources 879</p> <p><b>Programming with WPF 884</b></p> <p>WPF User Controls 884</p> <p>Implementing Dependency Properties 884</p> <p><b>Summary 895</b></p> <p><b>Chapter 26: Windows Communication Foundation 899</b></p> <p><b>What Is WCF? 900</b></p> <p><b>WCF Concepts 901</b></p> <p>WCF Communication Protocols 901</p> <p>Addresses, Endpoints, and Bindings 902</p> <p>Contracts 904</p> <p>Message Patterns 905</p> <p>Behaviors 905</p> <p>Hosting 906</p> <p><b>WCF Programming 906</b></p> <p>The WCF Test Client 914</p> <p>Defining WCF Service Contracts 917</p> <p>Data Contracts 918</p> <p>Service Contracts 918</p> <p>Operation Contracts 919</p> <p>Message Contracts 920</p> <p>Fault Contracts 920</p> <p>Self-Hosted WCF Services 925</p> <p><b>Summary 933</b></p> <p><b>Chapter 27: Windows Workflow Foundation 935</b></p> <p><b>Hello World 936</b></p> <p><b>Workflows and Activities 937</b></p> <p>If Activity 938</p> <p>While Activity 938</p> <p>Sequence Activity 938</p> <p><b>Arguments and Variables 939</b></p> <p><b>Custom Activities 944</b></p> <p>Workflow Extensions 946</p> <p>Activity Validation 952</p> <p>Activity Designers 953</p> <p><b>Summary 955</b></p> <p>Appendix A: Exercise Solutions 957</p> <p>Index 1009</p>
<p><b>Karli Watson</b> is an author and a consultant for Infusion. <p><b>Christian Nagel</b> is an author, Microsoft Regional Director, and software architect with more than 20 years of experience. <p><b>Jacob Hammer Pedersen</b> is an author and senior application developer at Elbek & Vejrup, Denmark. <p><b>Jon D. Reid</b> is Software Engineering Manager at Metrix LLC. <p><b>Morgan Skinner</b> is a consultant for Microsoft UK. <p><b>Wrox Beginning guides</b> are crafted to make learning programming languages and technologies easier than you think, providing a structured, tutorial format that will guide you through all the techniques involved.
<p><b>Learn programming with C# 2010 and the .NET framework</b> <p>Beginning with C# 2010 programming basics such as variables, flow control, and object oriented programming, this invaluable book then moves into web and Windows programming and data access (databases and XML). All the while, the expert team of authors focuses on the tools that you need to program C#, the Visual C# 2010 development environment in Visual Studio<sup>®</sup> 2010. The step-by-step instructions and constructive examples featured throughout the book will show you how to program confidently with useful code in C# 2010. <p><i>Beginning Visual C# 2010: </i> <ul><li>Explains basic C# 2010 syntax, including variables and expressions</li> <li>Reviews generics and explains how to define and use them</li> <li>Covers Windows<sup>®</sup> programming and Windows Forms</li> <li>Examines language enhancements, Lambda expressions, and extension methods</li> <li>Shows how to deploy Windows applications</li> <li>Discusses XML and provides an introduction to LINQ</li> <li>Delves into debugging and error handling</li> <li>Demonstrates useful techniques for WPF and WCF</li></ul> <p><b>wrox.com</b> <p><b>Programmer Forums</b> <p>Join our Programmer to Programmer forums to ask and answer programming questions about this book, join discussions on the hottest topics in the industry, and connect with fellow programmers from around the world. <p><b>Code Downloads</b> <p>Take advantage of free code samples from this book, as well as code samples from hundreds of other books, all ready to use. <p><b>Read More</b> <p>Find articles, ebooks, sample chapters and tables of contents for hundreds of books, and more reference resources on programming topics that matter to you.

Diese Produkte könnten Sie auch interessieren:

Domain Architectures
Domain Architectures
von: Daniel J. Duffy
PDF ebook
31,99 €