没有合适的资源?快使用搜索试试~ 我知道了~
首页C#高级指南:Apress《Pro Silverlight 3实战》
C#高级指南:Apress《Pro Silverlight 3实战》
需积分: 10 0 下载量 140 浏览量
更新于2024-07-23
收藏 25.57MB PDF 举报
"《Pro Silverlight 3 in C#》是一本由Matthew MacDonald编写的高级编程指南,专为Apress出版社于2009年10月发行。本书针对的是Silverlight 3技术在C#语言环境下的应用,旨在帮助读者创建跨平台的.NET应用程序,适用于浏览器环境。作为《Silverlight专家之声》系列的一部分,作者以其深厚的专业知识,深入探讨了Silverlight 3的核心概念和技术细节。
该书的主要内容涵盖了从基础到高级的Silverlight 3开发,包括但不限于C#语法、用户界面设计、数据绑定、控件使用、网络通信、多媒体处理以及性能优化等方面。通过全彩插图和详尽的代码示例,读者可以迅速掌握如何利用C#语言的强大功能来构建高效、交互式的Web应用。
版权方面,所有内容未经版权所有者Matthew MacDonald和出版商事先书面许可,不得任何形式复制或传播,包括但不限于影印、录音或通过任何信息存储和检索系统。本书具有纸质版(ISBN-13: 978-1-4302-2281-8)和电子版(ISBN-13: 978-1-4302-2382-5)可供选择,印刷和装订均在美国完成。
编辑团队由Ewan Buckingham领导,Damien Foggon担任技术审阅者,而Clay Andres、Steve Anglin、Mark Beckner等也参与了编辑工作,确保了内容的质量和准确性。书中还提及了可能使用的商标,作者以非侵权的方式提及这些商标,以尊重其所有者权益。
《Pro Silverlight 3 in C#》是开发者学习和提升Silverlight 3开发技能的宝贵资源,无论你是初学者还是经验丰富的程序员,都能从中收获实用的技巧和深入的理解。"
■ CONTENTS
xiv
Animation Easing.........................................................................................................................339
Using an Easing Function .......................................................................................................................340
Easing In and Easing Out........................................................................................................................341
Easing Function Classes.........................................................................................................................342
Animation Types Revisited..........................................................................................................346
Animating Transforms ............................................................................................................................346
Animation Perspective Projections ........................................................................................................349
Animating Brushes..................................................................................................................................351
Animating Pixel Shaders.........................................................................................................................352
Key-Frame Animation .............................................................................................................................353
Discrete Key Frames..........................................................................................................................355
Easing Key Frames ............................................................................................................................355
Spline Key Frames.............................................................................................................................356
Animations in Code .....................................................................................................................357
The Main Page.........................................................................................................................................359
The Bomb User Control ...........................................................................................................................360
Dropping the Bombs ...............................................................................................................................362
Intercepting a Bomb ...............................................................................................................................365
Counting Bombs and Cleaning Up..........................................................................................................366
Encapsulating Animations ..........................................................................................................368
Page Transitions .....................................................................................................................................369
The Base Class........................................................................................................................................370
The Wipe Transition ................................................................................................................................372
Frame-Based Animation .............................................................................................................374
Animation Performance ..............................................................................................................378
Desired Frame Rate.................................................................................................................................378
Hardware Acceleration ...........................................................................................................................379
Enabling Hardware Acceleration ......................................................................................................380
Bitmap Caching .................................................................................................................................380
Evaluating Hardware Acceleration ...................................................................................................383
The Last Word..............................................................................................................................385
■Chapter 11: Sound, Video, and Deep Zoom....................................................................387
Supported File Types...................................................................................................................387
The MediaElement.......................................................................................................................388
Controlling Playback...............................................................................................................................389
Handling Errors .......................................................................................................................................390
Playing Multiple Sounds .........................................................................................................................390
Changing Volume, Balance, and Position ..............................................................................................391
Playing Video...........................................................................................................................................395
Client-Side Playlists................................................................................................................................396
Server-Side Playlists...............................................................................................................................396
■ CONTENTS
xv
Progressive Downloading and Streaming..............................................................................................397
Adaptive Streaming.................................................................................................................................399
Advanced Video Playback...........................................................................................................400
Video Encoding........................................................................................................................................400
Encoding in Expression Encoder ............................................................................................................401
Markers ...................................................................................................................................................403
Adding Markers with Expression Encoder .......................................................................................403
Using Markers in a Silverlight Application.......................................................................................405
VideoBrush ..............................................................................................................................................408
Video Effects ...........................................................................................................................................409
Deep Zoom...................................................................................................................................414
Creating a Deep Zoom Image Set...........................................................................................................416
Using a Deep Zoom Image Set in Silverlight..........................................................................................419
The Last Word..............................................................................................................................423
■Chapter 12: Styles and Behaviors ..................................................................................425
Styles ...........................................................................................................................................425
Defining a Style.......................................................................................................................................426
Applying a Style ......................................................................................................................................427
Dynamic Styles........................................................................................................................................428
Style Inheritance .....................................................................................................................................429
Organizing Styles ....................................................................................................................................430
Behaviors.....................................................................................................................................431
Getting Support for Behaviors ................................................................................................................432
Triggers and Actions...............................................................................................................................432
Creating an Action.............................................................................................................................433
Connecting an Action to an Element.................................................................................................435
Design-Time Behavior Support in Blend ..........................................................................................436
Creating a Targeted Trigger..............................................................................................................439
Creating a Behavior.................................................................................................................................443
Finding More Behaviors..........................................................................................................................446
The Last Word..............................................................................................................................448
■Chapter 13: Templates and Custom Controls ................................................................449
Template Basics..........................................................................................................................449
Creating a Template................................................................................................................................450
Reusing Control Templates.....................................................................................................................451
The ContentPresenter .............................................................................................................................452
Template Bindings ..................................................................................................................................452
Setting Templates through Styles ..........................................................................................................454
Reusing Colors ........................................................................................................................................455
The Parts and States Model........................................................................................................456
Understanding States with the Button Control ......................................................................................457
■ CONTENTS
xvi
Showing a Focus Cue..............................................................................................................................462
Transitions...............................................................................................................................................463
The Default Transition.......................................................................................................................464
From and To Transitions ...................................................................................................................465
Transitioning to a Steady State.........................................................................................................466
Custom Transition .............................................................................................................................466
Understanding Parts with the Slider Control .........................................................................................468
Creating Templates for Custom Controls ...................................................................................472
Planning the FlipPanel Control ...............................................................................................................473
Creating the Solution ..............................................................................................................................474
Starting the FlipPanel Class....................................................................................................................474
Adding the Default Style with Generic.xaml ..........................................................................................476
Choosing Parts and States......................................................................................................................478
Starting the Default Control Template ...................................................................................................480
The FlipButton Control ............................................................................................................................481
Defining the State Animations................................................................................................................482
Wiring Up the Elements in the Template................................................................................................484
Using the FlipPanel .................................................................................................................................486
Using a Different Control Template........................................................................................................487
The Last Word..............................................................................................................................489
■Chapter 14: Browser Integration....................................................................................491
Interacting with HTML Elements.................................................................................................492
Getting Browser Information ..................................................................................................................493
The HTML Window ..................................................................................................................................494
Popup Windows.......................................................................................................................................495
Inspecting the HTML Document .............................................................................................................496
Manipulating an HTML Element..............................................................................................................498
Inserting and Removing Elements....................................................................................................501
Changing Style Properties.................................................................................................................502
Handling JavaScript Events....................................................................................................................503
Code Interaction ..........................................................................................................................505
Calling Browser Script from Silverlight..................................................................................................506
Calling Silverlight Methods from the Browser.......................................................................................506
Instantiating Silverlight Objects in the Browser....................................................................................509
Combining Silverlight and HTML Content...................................................................................510
Sizing the Silverlight Control to Fit Its Content......................................................................................511
Placing the Silverlight Control Next to an HTML Element .....................................................................512
Securing HTML Interoperability ..................................................................................................515
The Last Word..............................................................................................................................516
■Chapter 15: ASP.NET Web Services................................................................................517
Building Web Services for Silverlight.........................................................................................517
■ CONTENTS
xvii
Creating a Web Service...........................................................................................................................518
Adding a Service Reference....................................................................................................................519
Calling the Web Service..........................................................................................................................521
Configuring the Web Service URL...........................................................................................................524
Web Service Data Types..............................................................................................................526
More Advanced Web Services.....................................................................................................527
Cross-Domain Web Service Calls...........................................................................................................528
Monitoring the Network Connection ......................................................................................................530
Using ASP.NET Platform Services...........................................................................................................531
Duplex Services...........................................................................................................................533
Configuring the Service ..........................................................................................................................534
The Interfaces .........................................................................................................................................535
The Service..............................................................................................................................................536
The Client.................................................................................................................................................537
The Last Word..............................................................................................................................539
■Chapter 16: Data Binding................................................................................................541
Binding to Data Objects...............................................................................................................542
Building a Data Object ............................................................................................................................542
Displaying a Data Object with DataContext...........................................................................................543
Storing a Data Object as a Resource......................................................................................................546
Editing with Two-Way Bindings .............................................................................................................547
Validation ................................................................................................................................................548
ValidatesOnException........................................................................................................................548
NotifyOnValidationError.....................................................................................................................551
The Validation Class..........................................................................................................................552
Change Notification.................................................................................................................................553
Building a Data Service...........................................................................................................................554
Calling the Data Service..........................................................................................................................557
Binding to a Collection of Objects...............................................................................................559
Displaying and Editing Collection Items ................................................................................................559
Inserting and Removing Collection Items..............................................................................................563
Binding to a LINQ Expression .................................................................................................................564
Master-Details Display ...........................................................................................................................567
Data Conversion ..........................................................................................................................570
Formatting Strings with a Value Converter............................................................................................570
Creating Objects with a Value Converter ...............................................................................................574
Applying Conditional Formatting............................................................................................................577
Data Templates............................................................................................................................579
Separating and Reusing Templates .......................................................................................................581
More Advanced Templates .....................................................................................................................581
Changing Item Layout.............................................................................................................................583
■ CONTENTS
xviii
The Last Word..............................................................................................................................584
■Chapter 17: Data Controls ..............................................................................................585
Better Data Forms .......................................................................................................................586
The Goal: Data Class Markup .................................................................................................................586
The Label .................................................................................................................................................587
The DescriptionViewer............................................................................................................................589
The ValidationSummary..........................................................................................................................590
Data Annotations.........................................................................................................................593
Raising Annotation Errors.......................................................................................................................593
The Annotation Attributes.......................................................................................................................595
Required.............................................................................................................................................595
StringLength ......................................................................................................................................595
Range.................................................................................................................................................596
RegularExpression.............................................................................................................................596
CustomValidation ..............................................................................................................................599
Web Service Type Sharing......................................................................................................................601
Identifying Your Data Classes...........................................................................................................601
Setting Up the Visual Studio Solution...............................................................................................602
The DataGrid................................................................................................................................604
Creating a Simple Grid............................................................................................................................605
Resizing and Rearranging Columns.......................................................................................................607
Defining Columns....................................................................................................................................608
The DataGridCheckBoxColumn.........................................................................................................610
The DataGridTemplateColumn ..........................................................................................................610
Formatting and Styling Columns............................................................................................................612
Formatting Rows.....................................................................................................................................614
Row Details .............................................................................................................................................616
Freezing Columns....................................................................................................................................617
Selection..................................................................................................................................................618
Sorting.....................................................................................................................................................619
DataGrid Editing...........................................................................................................................620
Editing with Templates ...........................................................................................................................620
Validation and Editing Events.................................................................................................................621
The PagedCollectionView............................................................................................................624
Sorting.....................................................................................................................................................625
Filtering ...................................................................................................................................................625
Grouping..................................................................................................................................................626
Paging......................................................................................................................................................628
The TreeView...............................................................................................................................631
Filling a TreeView....................................................................................................................................631
A Data-Bound TreeView..........................................................................................................................632
剩余833页未读,继续阅读
点击了解资源详情
点击了解资源详情
点击了解资源详情
2010-04-20 上传
2010-03-17 上传
2010-03-17 上传
2010-03-13 上传
2010-03-13 上传
txp914
- 粉丝: 22
- 资源: 701
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- PureMVC AS3在Flash中的实践与演示:HelloFlash案例分析
- 掌握Makefile多目标编译与清理操作
- STM32-407芯片定时器控制与系统时钟管理
- 用Appwrite和React开发待办事项应用教程
- 利用深度强化学习开发股票交易代理策略
- 7小时快速入门HTML/CSS及JavaScript基础教程
- CentOS 7上通过Yum安装Percona Server 8.0.21教程
- C语言编程:锻炼计划设计与实现
- Python框架基准线创建与性能测试工具
- 6小时掌握JavaScript基础:深入解析与实例教程
- 专业技能工厂,培养数据科学家的摇篮
- 如何使用pg-dump创建PostgreSQL数据库备份
- 基于信任的移动人群感知招聘机制研究
- 掌握Hadoop:Linux下分布式数据平台的应用教程
- Vue购物中心开发与部署全流程指南
- 在Ubuntu环境下使用NDK-14编译libpng-1.6.40-android静态及动态库
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功