مشخصات کتاب
-
Jason Beres-Bill Evjen-Devin Rader
-
2010
-
انگلیسی
-
3912
-
509
-
0
professional silverlight® 4
Contents
Introduction xxv
Introduction t Chapter 1: o Silverlight 1
What Is Silverlight? 2
Silverlight Versions Explained 5
Application Development Scenarios 6
Getting the Silverlight Plug-In 8
Getting the Silverlight SDK 11
Building Silverlight Applications 12
Silverlight 4 Tour 12
XAML 13
.NET Framework Support 14
Graphics and Animations 15
Page Layout and Design 18
User Interface Controls 20
Using Media in Silverlight 21
Local Data Storage 22
Out-of-Browser Experiences 22
Local Filesystem Access 23
Navigation Framework 23
Annotation and Ink 24
Accessing the Network 25
Data Binding 26
Printing 27
Drag-and-Drop 27
Clipboard Access 27
Deep Zoom Graphics 28
Summary 29
Chapter 2: Building Applications with Visual Studio 31
Creating a Basic Silverlight Application 31
Using Silverlight Designer for Visual Studio 35
Creating Silverlight Project and Web Application Project Files 40
Using the Silverlight Design Surface 41
Understanding the XAP File 47
Caching Assemblies 50
Adding Class Definition and Partial Classes 52
Understanding the Application Life Cycle 55
Debugging Silverlight Applications 57
Attaching to a Process to Debug 57
Attaching to a Remote Macintosh Process 59
Configuring Silverlight MIME Types 61
Adding MIME Support to IIS 61
Summary 62
Building Applications w Chapter 3: ith Expression Blend 4 63
Learning Expression Blend Basics 64
IDE Tour 64
Creating Your Own Silverlight Project 77
Using Expression Blend Behaviors 78
Implementing Behaviors 78
Consuming Behaviors 80
Using the Visual State Manager 81
Creating a Control Template(s) 81
Customizing Visual States 83
Importing Design Assets 83
Importing PhotoShop (PSD) Assets 84
Importing Illustrator (AI) Files 85
Importing Fonts and Images Assets 85
Using the Expression Suite 86
Expression Encoder 87
Deep Zoom Composer 87
Summary 91
Chapter 4: Working with the Navigation Framework 93
Using the Navigation Template 93
Creating Parameterized Query Strings 99
Using the Frame Class 105
Using a Custom Menu Control 111
Adding Navigation Animations 113
Summary 115
Chapter 5: Controlling Layout with Panels 117
Measure, Then Arrange 118
Element Sizing Characteristics 120
Height and Width 120
Alignment 123
Margin and Padding 123
Using Layout Panels 125
Canvas 126
StackPanel 127
VirtualizingStackPanel 128
Grid 129
WrapPanel 131
DockPanel 132
Finding Third-Party Panels 133
Creating Custom Panels 133
Silverlight Plug-In Sizing 137
Summary 138
Working with Chapter 6: Visual Controls 139
Where to Find Controls 140
Using Text Display Controls 142
TextBlock 142
Label 143
Using Input Editor Controls 144
Text 144
Using Numeric Editor Controls 147
Dates and Time 150
Using Lists and Items Controls 154
DataGrid 154
DataForm 162
ListBox, ComboBox, and TabControl 163
DataPager 169
Accordion 170
TreeView 172
Using Button Controls 175
Button 175
HyperlinkButton 177
ToggleButton 177
Using the GridSplitter Control 178
Using the Image Control 179
Using Data Visualization Controls 180
TreeMap 180
Chart 185
Using Other Miscellaneous Controls 189
ViewBox 189
BusyIndicator 190
Expander 192
ValidationSummary 192
Tooltip 193
ScrollViewer 194
Creating Custom Controls 195
Template Parts 200
Visual States 201
Summary 203
Chapter 7: Accessing Data 205
Processing XML Data 205
LINQ to XML 206
Using an XmlReader 208
Binding a User Interface to Data 209
Establishing a Data-Binding Connection 209
Handling Data Updates 215
Converting Data Types 222
Working with Services 225
Building an ASP.NET Web Service 227
Consuming a Simple XML Web Service 234
Working with Windows Communication Foundation (WCF) 238
Working with REST-Based Services 247
Summary 255
Chapter 8: WCF RIA Services 257
Understanding WCF RIA Services 258
Building a Simple RIA Services Application 259
Reviewing the Business Application Solution 260
Building an Entity Data Model 261
Building a Domain Service 264
Connecting the Silverlight Client to Your Domain Service 268
Connecting to the Domain Service through XAML 273
Filtering Results 277
Summary 280
Chapter 9: Out-of-Browser Experiences 281
Creating an Out-of-Browser Application 281
Out-of-Browser Application Features 282
Configuring an Out-of-Browser Application in Visual Studio 283
Installing an Out-of-Browser Application 287
Uninstalling an Out-of-Browser Application 290
Updating an Out-of-Browser Application 290
Installing Trusted Applications 292
Accessing the File Systems 295
Using COM Automation 295
Support for Window Customization 296
Adding Digital Signatures 299
Installing a Local Silverlight Application 300
Summary 300
Networking Chapter 10: Applications 301
The WebClient Class 302
Using OpenReadAsync() 302
Downloading Files Using WebClient 304
Uploading Files Using WebClient 307
Reusing a Single WebClient Object 310
Cross-Domain Access 311
Silverlight and WCF Duplex Communications 314
Setting Up the Duplex Service 314
Setting Up the Duplex Client 320
Sockets 323
Setting Up the Policy Server 324
Setting Up the Application Sockets Server 328
Setting Up the Sockets Client 332
Summary 336
Chapter 11: Building Line of Business Applications 337
Line of Business Basics 337
Responding to Mouse Actions 338
Enabling Right-Click Support 340
Handling Multi-Touch 342
Drawing with Ink 343
Enabling Clipboard Access 345
Adding Printing Support 347
Supporting Drag-and-Drop 349
Using the Web Browser Control 350
Advanced Scenarios 351
Communicating between Silverlight Applications 351
Integrating with Office 364
Globalization and Localization 366
Localizing Your Application 367
Using Resource Files 367
Packing and Deploying 369
Supporting Bidirectional Right-to-Left (RTL) Text 370
Deploying Best Practices 371
Full-Screen Applications 371
Summary 373
Application Chapter 12: Architecture 375
Understanding Design Patterns 376
Exploring the Model View ViewModel (MVVM) 377
Learning about Inversion of Control/Dependency Injection 390
Exploring the Event Broker Pattern 395
Using Silverlight Frameworks 396
Exploring the Managed Extensibility Framework 396
Exploring PRISM/Composite Application Library 411
Defining Your Data Access Strategy 424
Handling Performance 427
Summary 428
Chapter 13: DO M Interaction 429
Configuring the Silverlight Plug-In 429
windowless 432
splashScreenSource 433
initParams 436
enablehtmlaccess 437
enableAutoZoom 437
enableGPUAcceleration 437
enableNavigation 437
allowHtmlPopupWindow 437
Plug-In API 438
Creating Interaction between Silverlight and JavaScript 438
JavaScript API 439
HTML Bridge 441
Summary 446
Chapter 14: Securing Your Applications 449
Taking Advantage of AS P.NE T 450
Forms-Based Authentication 450
Windows-Based Authentication 455
Authenticating Specific Files and Folders 460
Using AS P.NE T Application Services 461
Working with Membership on the Server 461
Working with Membership on the Client 468
Working with Role Management on the Server 470
Summary 477
Accessing Audio a Chapter 15: nd Video Devices 479
Configuring Permissions 479
Accessing Audio and Video Devices 481
Capturing Images from a Video Feed 488
Saving Images to the Filesystem 492
Capturing an Audio Stream 494
Summary 495
Chapter 16: Working with File I/O 497
The OpenFileDialog and SaveFileDialog Classes 497
Classes for Managing the Filesystem 500
.NET Classes That Represent Files and Folders 501
Using the Path Class 504
Using Basic File Objects from Silverlight 504
Moving, Copying, and Deleting Files 514
Extending on the FileProperties Solution 514
Using the Move, Copy, and Delete Methods 515
Reading and Writing Files 517
Reading from a File 518
Writing to a File 521
Using Streams 523
Using Buffered Streams 525
Reading and Writing Binary Files Using FileStream 525
Reading and Writing to Text Files 528
Using Isolated Storage Options 532
Reading and Writing from Isolated Storage 532
Understanding Space Constraints 536
Creating Directories in Isolated Storage 537
Deleting Your Store 538
Summary 539
Using Graphics a Chapter 17: nd Visuals 541
The Basics 541
Working with Rectangles and Borders 542
Applying Rounded Corners 542
Using the Ellipse 545
Using the Path 545
Using Geometries 548
Using Clipping/Masking Elements 550
Expression Blend Shapes 552
Binding to Shape Properties 554
Images and Media 554
Displaying Images 554
Displaying Media 559
Brushes 560
Painting with Solids 560
Painting with Linear Gradients 560
Painting with Radial Gradients 561
Painting with Images 562
Painting with Video 563
Editing Brushes in Expression Blend 564
Creating ImageBrushes 568
Fonts and Font Embedding 570
Effects 572
Applying Effects 572
Using Native Effects 573
Using Custom Effects 575
Transforms 581
Using 2D Transforms 582
Using Perspective 3D 587
Summary 590
Chapter 18: Working with Animations in Silverlight 591
Storyboard Animations 592
Applying Easing Functions 598
Controlling Storyboards Using Behaviors 601
Nesting Storyboards 601
Using Storyboards as Timers 602
Keyframe Animation 603
Rendering CompositionTargets 607
Animating Visibility 608
Animating Sprites 610
Summary 611
Chapter 19: Working with Text 613
Displaying and Inputting Text 613
Using the TextBlock Element 614
Using the RichTextBox Control 621
Font Support and Rendering 634
Using Embedded Fonts 636
Creating Font Glyph Subsets 638
Rendering Text 639
Summary 639
Chapter 20: Making It Richer with Media 641
Supported Formats 641
Unsupported Windows Media Formats 643
H.264 and AA C Support 643
Digital Rights Management 644
Using the MediaElement Control 644
Build Actions and Referencing Media 645
Adding a MediaElement in Blend 649
Sizing Video and Setting the Stretch Behavior 649
Transforming Video 651
Rotating Video in 3D 652
Clipping Video 653
Painting Elements with the VideoBrush 655
Simulating Video Reflections 656
Enabling GPU Hardware Acceleration 657
Audio Settings 658
Buffering 658
Detecting Download Progress 660
Detecting Playback Quality 660
Controlling Playback 661
Responding to Video Markers 663
Handling Failed Media 665
Responding to State Changes 666
Media Playlists 667
Server-Side Playlist (SSPL) Files 667
Advanced Stream Redirector (ASX) Files 669
Encoding Media with Expression Encoder 671
Smooth Streaming and IIS 7 678
Summary 679
Chapter 21: Styling and Themes 681
Getting Started 682
Defining a Core Terminology 682
Defining the Working Environment: A XAML-Based Approach 682
Defining Local Styling (Inline Styling) 683
Styling with Resources 684
Working with the Style Object 688
Understanding Value Resolution 689
Creating BasedOn Styles 689
Changing the Look of a Control with a Custom ControlTemplate 690
Defining and Using Implicit Styles 706
Defining and Organizing Resources 707
Defining Standalone ResourceDictionaries 708
Loading ResourceDictionaries (via the Merged Dictionaries Collection) 708
Understanding Resource Scope 709
Organizing Resources 710
Naming Resources 711
Using Themes 712
Using Silverlight Toolkit Themes 712
Creating Custom Themes 716
Distributing Your Theme 716
Editing Styles and Templates in Expression Blend 716
Editing the Default Button Style 716
Creating a Custom Button 719
Summary 721
Appendix A: XA ML Primer 723
Introducing XAML 723
Silverlight XAML Basics 724
Declaring Objects in XAML 726
Object or Content Element Syntax 726
Attribute Element Syntax 727
Property Element Syntax 727
Setting a Property Using Implicit Collection Syntax 728
Deciding When to Use Attribute or Property Element Syntax
to Set a Property 729
XAML Hierarchy 730
Events and the Silverlight Control 731
Event Handlers and Partial Classes 731
Event Bubbling 734
Markup Extensions 736
Binding Markup Extensions 737
StaticResource Markup Extensions 739
Summary 739
Testing Silverlight Appendix B: Applications 741
Creating the Sample Application 741
Using the Silverlight Unit Test Framework 743
Using the Selenium Test Framework 748
Automated UI Testing Using White 751
Mocking Frameworks 755
Summary 755
Appendix C: Building Facebook Applications
with Silverlight 757
Creating a New Application on Facebook 757
Using the Facebook Developer Toolkit 760
Adding the Facebook Connect Components 760
Using an Asynchronous API Request 764
Adding Features from the Facebook API 767
Summary 773
Appendix D: Integrating Silverlight into SharePoint 2010 775
The Sample Application 775
Using the SharePoint Foundation 2010 Silverlight Object Model 776
Deploying a Silverlight Application into SharePoint 780
Summary 781
Appendix E: Silverlight Control Assemb lies 783
Index 787