Appearance Properties
338
Layout Properties
338
Window Style Properties 338
form Design Preferences 338
adding and Positioning Controls 341
Vertically Aligning Text Controls 342
Automatic Positioning of Multiple Controls 342
Tab Order and Layering Controls 344
Locking Control Design 344
Setting Control Properties 345
Service-Based Components 346
Smart Tag Tasks 346
Container Controls 347
Panel and SplitContainer 347
FlowLayoutPanel 348
TableLayoutPanel 348
Docking and anchoring Controls 349
summary 350
chaPter 18: windows Presentation foundation (wPf) 351
What is WPf? 352
Getting started with WPf 353
XAML Fundamentals 355
The WPF Controls 357
The WPF Layout Controls 358
The WPf Designer and XaMl editor 360
Working with the XAML Editor 361
Working with the WPF Designer
362
The Properties Tool Window
364
Data Binding Features 367
styling Your application 371
Windows forms interoperability 372
Hosting a WPF Control in Windows Forms
372
Hosting a Windows Forms Control in WPF 374
Debugging with the WPf Visualizer 376
summary 377
contents
chaPter 19: office business aPPlications
Choosing an office Project Type 380
Document-Level Customizations 381
Application-Level Add-Ins 381
Creating a Document-level Customization 382
Your First VSTO Project 382
Protecting the Document Design 385
Adding an Actions Pane 386
Creating an application add-in 388
Some Outlook Concepts 388
Creating an Outlook Form Region 389
Debugging office applications 392
Unregistering an Add-In 392
Disabled Add-Ins 394
Deploying office applications 394
summary 396
Part V: web aPPlications
chaPter 20: asP net web forMs
Web application vs. Web site Projects 400
Creating Web Projects 401
Creating a Web Site Project 401
Creating a Web Application Project 404
Other Web Projects 406
Starter Kits, Community Projects, and Open-Source Applications 406
Designing Web forms 407
The HTML Designer 407
Positioning Controls and HTML Elements 409
Formatting Controls and HTML Elements 411
CSS Tools 412
Validation Tools 416
Web Controls 417
Navigation Components 418
User Authentication 418
Data Components 420
Web Parts 423
Master Pages 424
ConTenTs
rich Client-side Development 425
Developing with JavaScript
426
Working with ASP NET AJAX
427
Using AJAX Control Extenders 429
asP.neT Web site administration 431
Security 432
Application Settings
433
ASP NET Configuration in IIS 434
summary 434
chaPter 21: asP net MVc 437
Model View Controller 438
Getting started with asP.neT MVC 439
Choosing a Model 440
Controllers and action Methods 441
rendering a Ui with Views 443
advanced MVC 451
Routing 451
Action Method Parameters 456
Areas 459
Validation 461
Partial Views 463
Custom View Templates 463
Dynamic Data Templates 464
jQuery 468
summary 470
chaPter 22: silVerliGht 471
What is silverlight? 472
Getting started with silverlight 473
navigation framework 478
Theming 479
enabling running out of Browser 481
summary 484
chaPter 23: dynaMic data
485
Creating a Dynamic Data Web application 486
Adding a Data Model 487
Exploring a Dynamic Data Application 489
xxiii
contents
Customizing the Data Model 491
Scaffolding Individual Tables 491
Customizing Individual Data Fields 492
Adding Custom Validation Rules 494
Customizing the Display Format 496
Customizing the Presentation 498
Page Templates 499
Field Templates 502
Entity Templates 506
Filter Templates 509
enabling Dynamic Data for existing Projects 511
summary 512
chaPter 24: sharePoint 513
Preparing the Development environment 514
Installing the Prerequisites 515
Installing SharePoint 2010 517
exploring sharePoint 2010 518
Creating a sharePoint Project 520
Building Custom sharePoint Components 524
Developing Web Parts 524
Creating Content Types and Lists 525
Adding Event Receivers 527
Creating SharePoint Workflows 528
Working with features 529
Packaging and Deployment 530
summary 532
chaPter 25: windows azure 533
The Windows azure Platform 534
The Development Fabric 535
Table, Blob, and Queue Storage 536
Application Deployment 540
Tuning Your Application 543
sQl azure 544
appfabric 545
Service Bus 545
Access Control Service 545
summary 546
Part Vi: data Part Vi: data
ConTenTs
chaPter 26: Visual database tools 549
Database Windows in Visual studio 2010 549
Server Explorer 550
The Data Sources Window 556
editing Data 556
Previewing Data 557
summary 558
chaPter 27: datasets and databindinG 559
Datasets overview 559
Adding a Data Source 561
The DataSet Designer 563
Binding Data 565
BindingSource 567
BindingNavigator 569
Data Source Selections 570
Saving Changes 573
Inserting New Items 575
Validation 576
Customized DataSets 578
BindingSource Chains and the DataGridView 579
Working with Data sources 581
The Web Service Data Source 583
Browsing Data 584
summary 586
chaPter 28: lanGuaGe inteGrated queries (linq) 587
linQ Providers 588
old-school Queries 588
Query Pieces 590
From 591
Select 592
Where 592
Group By 593
Custom Projections 594
Order By 594
Debugging and execution 596
linQ to XMl 597
contents
VB XML Literals 598
Paste XML as XElement 599
Creating XML with LINQ 600
Querying XMl 602
schema support 603
linQ to sQl 605
Creating the Object Model 606
Querying with LINQ to SQL 608
Binding LINQ to SQL Objects 614
linQPad 618
summary 618
chaPter 29: the ado net entity fraMework 621
What is the entity framework? 622
Comparison with LINQ to SQL 622
Entity Framework Concepts 623
Getting started 624
Creating an entity Model 624
The Entity Data Model Wizard 624
The Entity Framework Designer 626
Creating/Modifying Entities 630
Creating/Modifying Entity Associations 634
Entity Inheritance 635
Validating an Entity Model 635
Updating an Entity Model with Database Changes 635
Querying the entity Model 636
LINQ to Entities Overview 636
Getting an Object Context 636
CRUD Operations 637
Navigating Entity Associations 641
advanced functionality 642
Updating a Database from an Entity Model 642
Adding Business Logic to Entities 643
Plain Old CLR Objects (POCO) 643
summary 643
chaPter 30: rePortinG 645
Getting started with reporting 645
Designing reports 647
Defining Data Sources 648
xxvi
ConTenTs
Reporting Controls
650
Expressions, Placeholders, and Aggregates
661
Custom Code 663
Report Layout 668
Subreports 670
The Report Wizard 672
rendering reports 673
The Report Viewer Controls 673
Generating the Report 674
Rendering Reports to Different Formats 675
Deploying reports 677
summary 677
Part Vii: aPPlication serVices
chaPter 31: windows coMMunication
foundation (wcf) 681
What is WCf? 681
Getting started 682
Defining Contracts 683
Creating the Service Contract 684
Creating the Data Contract 685
Configuring WCf service endpoints 688
Hosting WCf services 691
Consuming a WCf service 696
summary 699
chaPter 32: windows workflow foundation (wf) 701
What is Windows Workflow foundation? 701
Why Use Windows Workflow? 702
Workflow Concepts 703
Activities 703
Control Flow Activities 704
Expressions 705
Workflow Run Time/Scheduler 705
Bookmarks 705
Persistence 706
Tracking 706
Getting started 707
contents
The Workflow foundation Designer 709
Creating a Workflow 712
Designing a Workflow 713
Writing Code Activities 715
Executing a Workflow 716
Debugging Workflows 718
Testing Workflows 719
Hosting the Workflow Designer 719
summary 723
chaPter 33: client aPPlication serVices 725
Client services 725
role authorization 729
User authentication 731
settings 733
login form 738
offline support 740
summary 743
chaPter 34: synchronization serVices 745
occasionally Connected applications 746
server Direct 746
Getting started with synchronization services 749
synchronization services over n-Tiers 751
Background synchronization 752
Client Changes 755
summary 756
chaPter 35: wcf ria serVices 757
Getting started 757
Domain services 760
Domain operations 762
Query Operations 762
Insert/Update/Delete Operations 763
Other Operation Types 763
Consuming a Domain service in silverlight 764
summary 769
Part Viii: confiGuration and resources Part Viii: confiGuration and resources
ConTenTs
chaPter 36: confiGuration files
773
.Config files 773
Machine Config
773
Web Config 774
App Config 774
Security Config 775
ApplicationHost Config 775
Configuration schema 775
Section: configurationSections 775
Section: startup 777
Section: runtime 777
Section: system runtime remoting 778
Section: system net 778
Section: cryptographySettings 779
Section: system diagnostics 779
Section: system web 779
Section: compiler 780
Configuration Attributes 780
application settings 782
Using appSettings 782
Project Settings 783
Dynamic Properties 784
Custom Configuration Sections 785
User settings 790
referenced Projects with settings 792
summary 793
chaPter 37: connection strinGs 795
Connection string Wizard
sQl server format
in-Code Construction
encrypting Connection strings
summary
795
800
801
803
804
chaPter 38: resource files 805
What are resources?
Text File Resources
Resx Resource Files
805
806
807
xxix
contents
Binary Resources 807
Adding Resources 808
Embedding Files as Resources 808
Naming Resources 809
Accessing Resources 809
Designer Files 810
resourcing Your application 811
Control Images 813
satellite resources 813
Cultures 813
Creating Culture Resources 814
Loading Culture Resource Files 814
Satellite Culture Resources 815
accessing specifics 816
Bitmap and Icon Loading 816
Cross-Assembly Referencing 816
ComponentResourceManager 816
Coding resource files 817
ResourceReader and ResourceWriter 818
ResxResourceReader and ResxResourceWriter 818
Custom resources 819
summary 823
Part ix: debuGGinG
chaPter 39: usinG the debuGGinG windows 827
The Code Window 827
Breakpoints 828
DataTips 828
The Breakpoints Window 828
The output Window 829
The immediate Window 830
The Watch Windows 831
QuickWatch 831
Watch Windows 1–4 832
Autos and Locals 833
The Code execution Windows 833
Call Stack 833
Threads 834
Modules 834
Processes 835
ConTenTs
The Memory Windows 835
Memory Windows 1–4
836
Disassembly 836
Registers 836
intelliTrace (Ultimate edition only) 837
The Parallel Debugging Windows 838
Parallel Stacks 839
Parallel Tasks 840
exceptions 841
Customizing the Exception Assistant 842
Unwinding an Exception 843
summary 843
chaPter 40: debuGGinG with breakPoints 845
Breakpoints 845
Setting a Breakpoint 846
Adding Break Conditions 848
Working with Breakpoints 850
Tracepoints 852
Creating a Tracepoint 852
Tracepoint Actions 852
execution Control 853
Stepping Through Code 853
Moving the Execution Point 855
edit and Continue 855
Rude Edits 855
Stop Applying Changes 856
summary 856
chaPter 41: datatiPs, debuG Proxies, and Visualizers 857
DataTips 858
Debugger attributes 859
DebuggerBrowsable
859
DebuggerDisplay
860
DebuggerHidden
861
DebuggerStepThrough
862
DebuggerNonUserCode
862
DebuggerStepperBoundary 862
Type Proxies 863
Raw View 865
Visualizers 865
contents
advanced Techniques 867
Saving Changes to Your Object 867
summary 869
chaPter 42: debuGGinG web aPPlications 871
Debugging server-side asP.neT Code 872
Web Application Exceptions 874
Edit and Continue 876
Error Handling 876
Debugging Client-side Javascript 877
Setting Breakpoints in JavaScript Code 878
Debugging Dynamically Generated JavaScript 878
Debugging ASP NET AJAX JavaScript 879
Debugging silverlight 879
Tracing 880
Page-Level Tracing 881
Application-Level Tracing 882
Trace Output 882
The Trace Viewer 883
Custom Trace Output 884
Health Monitoring 884
summary 886
chaPter 43: adVanced debuGGinG techniques 887
start actions 887
Debugging with Code 890
The Debugger Class 890
The Debug and Trace Classes 890
Debugging running applications 892
Attaching to a Windows Process 892
Attaching to a Web Application 893
Remote Debugging 894
.neT framework source 896
Multi-Threaded and Parallelized application Debugging 897
Debugging sQl server stored Procedures 899
Mixed-Mode Debugging 899
Post-Mortem Debugging 900
Generating Dump Files 900
Debugging Dump Files 901
summary 902
Part x: build and dePloyMent Part x: build and dePloyMent