Foundation Expression Blend 4 with Silverlight

Foundation Expression Blend 4 with Silverlight

von: Victor Gaudioso

Apress, 2011

ISBN: 9781430229742 , 440 Seiten

Format: PDF, OL

Kopierschutz: Wasserzeichen

Windows PC,Mac OSX geeignet für alle DRM-fähigen eReader Apple iPad, Android Tablet PC's Online-Lesen für: Windows PC,Mac OSX,Linux

Preis: 36,99 EUR

  • Reliable and Autonomous Computational Science - International Conference, RACS 2010, Atlanta, GA, USA, October 27-30, 2010
    Next-Generation Business Intelligence Software with Silverlight 3
    Spring Persistence with Hibernate
    Microsoft SharePoint 2010 - Building Solutions for SharePoint 2010
    Pro SharePoint 2010 Solution Development - Combining .NET, SharePoint, and Office 2010

     

     

     

     

 

Mehr zum Inhalt

Foundation Expression Blend 4 with Silverlight


 

Table of Contents

6

About the Author

13

About the Cover Image Designer

14

Acknowledgments

15

Introduction

16

Who this Book Is For

16

What this Book Will Teach You

16

What Are Silverlight/Blend 4, C#, and XAML?

17

Using Visual Studio and Blend

17

What Silverlight Is and How It Differs from WPF

18

Online Resources

18

Layout conventions

18

Chapter 1: Setting Up the Silverlight Development Environment

19

Installing Silverlight

19

Downloading and Installing Visual Studio 2010

19

Installing the Silverlight 4 Tools for Visual Studio 2010

20

Installing Expression Blend 4

20

Creating Your Very First Silverlight Application

20

Giving Your First Silverlight 4 Application Some Functionality

24

Summary

26

Chapter 2: The Blend Integrated Development Environment

27

New Features in Blend 4

27

The Blend 4 Toolbar

28

The Selection Tool

30

The Direct Selection Tool

30

The Pen/Pencil Tools

31

The Pan Tool

33

The Zoom Tool

33

The Eyedropper Tool

33

The Paint Bucket Tool

34

The Brush Transform and Gradient Tools

34

The Gradient Tool

34

The Brush Transform Tool

37

The Shape Tools: Rectangle, Ellipse, and Line

37

Layout Controls

38

Text Controls and Text Input Controls

39

Input Controls

39

The Asset Library Last Used tool

40

The Asset Library

40

The Objects and Timeline Panel

41

The Project Panel

42

The Properties Panel

43

The Brushes bucket

44

Creating the Color Resource

46

Using the New BlackToWhite Color Resource

48

Using OpacityMasks to Create a Reflection Effect

50

The Appearance Bucket

53

The Layout Bucket

54

The Common Properties Bucket

55

The Text Bucket

56

The Transform Bucket

56

The Miscellaneous Bucket

57

Search

58

The Resources Panel

58

Blend Development Views and Workspaces

59

Design View

59

XAML View

60

Split View

60

Workspaces

61

The Design Workspace

61

The Animation Workspace

61

Summary

67

Chapter 3: C#, XAML, and Object-Oriented Programming

68

C# and the .NET Framework

68

The .NET CLR

69

Why C#?

69

Encapsulation

69

Classes

70

Inheritance

71

Modularity

71

Maintainability

72

Automatic Garbage Collection

72

Language Integrated Query

72

XML documentation

72

XAML

73

A Simple OOP Project

75

Summary

87

Chapter 4: Layout Controls: Including the New Silverlight 4 Controls: Viewbox, RichTextBox, FlowDirection Property, and Improved Data Binding

88

The Grid

88

The Canvas

93

The StackPanel

95

The Border

97

Item Controls

98

Input Controls

102

New Silverlight 4 Controls

103

The Viewbox

103

The RichTextBox Control

105

Flow Direction

107

Improved Data Binding

110

DependencyObject Binding

110

Data Validation and Data Binding

110

String Format, TargetNullValue, and FallbackValue

110

Summary

111

Chapter 5: Timed Storyboards: Creating a Newton Cradle Application

112

What Are Storyboards?

113

Creating a Simple Storyboard

113

Storyboard Animation Types

118

Color

118

Point

118

Double

118

Creating the Newton’s Cradle Application

120

Behaviors

135

Implementing the ControlStoryboardAction Behavior

135

Summary

138

Chapter 6: Using VSM and Blend 4’s State Panel to Create a Silverlight Media Player

140

The Visual State Manager (VSM)

141

Using Blend 4’s States Panel

142

A Simple Silverlight Project

143

Creating a Media Player Using VSM

149

Creating the Silverlight Project in Blend 4

150

Designing the Navigation Orb

151

Creating the Backplate for the MediaElement

160

Adding the MediaElement

167

Positioning the Navigation Buttons and the Backplate

173

Adding a Reflection

173

Adding the States

175

Using Behaviors to Trigger the MouseEnter and MouseLeave States

178

Adding Easing Functions to Animations to Make Them More Realistic and Fun

181

Adding Behaviors to Add the Play, Pause, and Stop Functionality

182

Summary

184

Chapter 7: Behaviors in Silverlight

186

What Are Behaviors?

186

Using Behaviors

187

Creating Your Own Simple Behavior

196

Summary

205

Chapter 8: The Silverlight MediaElement: Create a Video Player with a Custom UserControl, XML De-serialization, and Behaviors

206

Choosing Between Silverlight and Flash for Video

207

Choosing Silverlight

207

Choosing Flash

208

Creating the Silverlight Video Player Application

209

Summary

237

Chapter 9: Events and EventHandlers

238

Creating the EventsAndEventHandlers project

238

Click

240

Mouse Events

241

MouseEnter and MouseLeave

243

MouseEnter

243

MouseLeave

245

MouseLeftButtonDown

246

MouseLeftButtonUp

248

New Events in Silverlight 4

249

Right-Click

249

MouseWheel

252

Drop Target Events

253

Summary

259

Chapter 10: Classes and Interfaces

260

Static Classes vs. Concrete Classes

260

Abstract Classes

261

Sealed Classes

261

Partial Classes

262

Singleton Classes

262

Private vs. Public Access Modifiers (Public and Private Classes)

262

Internal Classes

263

Protected Classes

263

Interfaces

263

Summary

273

Chapter 11: Styles, Control Templates, and Custom UserControls

274

Understanding the ControlTemplate

275

Creating a Button ControlTemplate with a Style

275

Creating ResourceDictionaries

279

Overriding Default Styles for Controls

281

Adding Your Button Style to Your Resource Dictionary

285

Creating Custom UserControls

285

Demystifying the DependencyProperty

292

Summary

298

Chapter 12: Writing a Custom Content Panel

299

Creating the Project

300

Summary

317

Chapter 13: Writing a Silverlight 4 Out-Of-Browser Application with Elevated Trust and the New Silverlight 4 COM API

318

Creating an Out-Of-Browser Silverlight 4 Application

319

Summary

333

Chapter 14: Creating a Photobooth Applicationwith the Silverlight 4 Webcam API

334

Creating the Application

335

Setting Up the Visuals in Expression Blend

336

Using the MouseDragElementBehavior to make items draggable

341

Adding the Buttons

342

Starting and Displaying the Webcam

344

Taking the Snapshot

347

Saving the Image

349

Adding the Draggable Items to the Saved Image

351

Summary

355

Chapter 15: MVVM: Model-View-ViewModel

356

Overview

356

History of MVVM

357

Data Binding, DataTemplates, and Commanding

357

Model

358

View

358

ViewModel

358

MVVM Features in Silverlight 4

359

Creating Your First MVVM Application in Blend 4

359

Overview of the MVVM Template Project

361

Creating Supporting Objects

362

Setting Up the ViewModel

365

Setting Up the Sample Data Source

367

Setting Up the View

371

MVVM Toolkits and Frameworks for Silverlight

381

Summary

382

Chapter 16: SketchFlow Prototyping

383

Create the Project

383

Setting Up the SketchFlow Structure

385

Adding the Visuals

387

Creating a Navigation Component Screen

389

Connecting to the Nav Component Screen

392

Adding Some Interaction to the Pages

393

Adding the Visual State Group

395

Hooking the Visual States Up

396

The SketchFlow Player and Feedback

398

Word Documentation

403

Summary

405

Chapter 17: New Features of Silverlight 4

406

Right-click and Mouse Wheel Support

407

The Printing API

407

ICommand Support

410

Addition of the RichTextArea Control

411

Clipboard API

411

Network Authentication

411

Improved Data Binding

412

Addition of ViewBox

413

Keyboard Access in Full-screen Mode

413

Google Chrome Support

413

Right-to-Left Support

413

Managed Extensibility Framework (MEF)

415

Offline Digital Rights Management (DRM)

415

Fluid UI Support in Items Controls

415

Cross-Domain Networking Made Easier

415

TextTrimming

415

Summary

416

Index

417