Professional WPF Programming: .NET Development with the Windows Presentation Foundation


Professional WPF Programming

If you want to learn how to build killer user interfaces for Windows and the web, then this book is for you. It arms you with the tools and code you'll need to effectively utilize the Windows Presentation Foundation (WPF). From creating appealing graphics and animated structures to enhancing performance and security, you'll be programming in no time.

First you'll explore the WPF framework and learn how to develop ...

See more details below
Paperback (Workbook)
$33.36 price
(Save 33%)$49.99 List Price
Other sellers (Paperback)
  • All (10) from $1.99   
  • New (4) from $26.59   
  • Used (6) from $1.99   
Sending request ...


Professional WPF Programming

If you want to learn how to build killer user interfaces for Windows and the web, then this book is for you. It arms you with the tools and code you'll need to effectively utilize the Windows Presentation Foundation (WPF). From creating appealing graphics and animated structures to enhancing performance and security, you'll be programming in no time.

First you'll explore the WPF framework and learn how to develop basic applications with ASP.NET or Visual Basic(r). Next you'll discover how to build more sophisticated WPF interfaces using Microsoft(r) ExpressionBlend and then progress to more advanced programming techniques.

Throughout the book, you'll find best practices for enterprise architectures using the WPF and its underlying technology. All this will help you quickly learn how to develop next-generation applications on the .NET 2.0 platform using the WPF.

What you will learn from this book

  • How to write applications with identical UIs on both Windows and the web
  • Tips for collaborating design and code development with Microsoft(r) Expression Blend
  • All about the object models, built-in server controls, HTML markup, code-behind, and the coordinative structure of each file
  • How to migrate Win32 applications to WPF
  • Techniques for integrating special effects and custom controls into an application
  • Advanced development concepts, including building workflows and a WCF service

Who this book is for

This book is for experienced .NET developers who want to begin creating WPF web and desktop applications.

Wrox Professional guides are planned and written by working programmers to meet the real-world needs of programmers, developers, and IT professionals. Focused and relevant, they address the issues technology professionals face every day. They provide examples, practical solutions, and expert education in new technologies, all designed to help programmers do a better job.

Read More Show Less

Product Details

  • ISBN-13: 9780470041802
  • Publisher: Wiley
  • Publication date: 4/16/2007
  • Series: Wrox Professional Guides
  • Edition description: Workbook
  • Edition number: 1
  • Pages: 480
  • Product dimensions: 7.30 (w) x 9.20 (h) x 1.00 (d)

Meet the Author

Chris Andrade is a Principal with Novera Consulting, aMicrosoft Certified Partner specializing in enterprise architectureand development with .NET and Microsoft server technology. Chrisdevotes most of his time to assisting companies in applyingMicrosoft technologies to improve their business processes andoperations. Chris has worked within a diverse range of businessverticals, including automotive, healthcare, and mortgage. Chrisalso takes active participation within the local developercommunity, speaking and presenting along the west coast wheneverpossible.

Shawn Livermore (MCAD, MCSD, PMP)[] has been architecting and developingMicrosoft-based solutions for nearly a decade. Shawn has beenconsulting as an enterprise and solutions architect for Fortune 500clientele within highly visible enterprise implementations. Hisrange of technical competence stretches across platforms and linesof business, but he specializes in Microsoft .NET enterpriseapplication architectures and Microsoft server-based productintegrations. Shawn lives in the Southern California area with hisbeautiful wife Shantell and amazing daughter Elexzandreia. Shawnalso enjoys beating his friend Jason at air hockey, basketball,baseball, football, arcade games, cards, billiards, ping pong,shuffleboard, trivia, golf, racquetball, dirt bike races,crosscountry skiing... and pretty much any other sport inexistence. Shawn would like to once again remind Jason,“Who’s your daddy?”

Mike Meyers is president of Novera Consulting Inc, asoftware development and consulting firm specializing in customapplication development utilizing the .NET platform and Microsoftserver technology. Based in Orange County, California, Mike’scompany is focused on providing solutions based on Microsoftplatforms and technology to companies spanning multiple industries.Mike has worked in a number of industries, including mortgage,healthcare, and various ecommerce ventures as developer, architect,and project manager. When he’s not writing code, Mike isactive mountain biking in southern California, hiking with hisfour-legged Labrador Dakota or playing music with friends.

Scott Van Vliet is an accomplished Solutions Architectwho has spent the past decade delivering successful Microsoft-basedsolutions to his clients. Currently a Senior Manager withCapgemini, a worldwide leader in technology consulting services,Scott has managed, architected, and developed solutions forcompanies across the globe. He is also the Microsoft DeliveryLeader for Capgemini’s Telecom, Media & Entertainmentpractice, providing technical and engagement leadership on allMicrosoft-based projects. Scott can be reached via his Web site at

Read More Show Less

Table of Contents

Acknowledgments ix

Introduction xix

Chapter 1: Overview of Windows Presentation Foundation1

A Brief History of the Windows API 2

Platform Evolution 2

Introducing .NET Framework 3.0 3

Meet Windows Presentation Foundation 3

Guiding Design Principles 3

Architecture 5


Declarative vs. Imperative 15

Visual Design Tools 18

XamlPad 18

Microsoft Expression Blend 19

Visual Designer for Windows Presentation Foundation 20

Electric Rain ZAM 3D 21

Mobiform Aurora 22

Summary 23

Chapter 2: WPF and .NET Programming 25

Getting Started 26

Required Installations 26

Types of WPF Applications 26

My First WPF Application 27

WPF Development Concepts 29


The Application Object 30

Creating the User Interface 32

Handling Events 35

Working with Controls 41

Triggers 51

Language Support 58

Deployment 61

Summary 61

Chapter 3: Anatomy of a WPF-Enabled Application 63

Project Composition 63

App.Manifest 66

AssemblyInfo.cs 66

Resources.resx 68

Settings.settings 68

MyApp.xaml 70

.NET Framework 3.0 Windows Application 71

Window1.xaml 72

XAML Browser Application 73

Page1.xaml 73

WCF Service Library 75

Class1.cs 75

WPF Custom Control Library 78

UserControl1.xaml 79

Summary 82

Chapter 4: Building a Rich UI with Microsoft Expression Blend— Part I 83

Overview 84

The Design Environment 85

Workspace Panels 86

The Artboard 87

Configuring the Environment 88

Project Structure 90

Adding a New Project File 90

Building and Deploying a Project 91

Creating Vector Objects 91

Shapes 92

Paths 93

Manipulating Objects with the Properties Panel 94

The Transform Panel 94

The Brushes Panel 95

Opacity, Transparency, and Visibility 97

Manipulating Text 98

Managing Layouts 99

UI Layout Panels 100

Other Layout Controls 103

Nesting Layout Panels 103

Animation 104

Timeline Sub-Panel 104

Keyframes 105

Animate an Object’s Property 106

Motion Paths 106

Triggers 107

Creating Controls 108

Templates 110

Styles 111

States 112

Importing Audio/Video Media 113

Summary 113

Chapter 5: Building a Rich UI with Microsoft Expression Blend— Part II 115

Expression Blend Workflow 116

Code Editing with Visual Studio 2005 117

Handling User Input 118

Keyboard and Mouse Classes 118

Events and Event Handling 118

Positioning 120

Hit Testing 124

The WPF Animation API 135

Animation Classes 135

Creating a Dynamic Animation Procedurally with Code 135

Programmatic Animation 139

Interacting with Storyboards 143

WPF Drawing API 145

Geometry 145

Shapes 146

Brushes 149

Summary 153

Chapter 6: Special Effects 155

Brushes 156

SolidColorBrush 156

GradientBrush 162

ImageBrush 165

DrawingBrush 167

VisualBrush 169

Bitmap Effects 171

Transformations 175

TranslateTransform 178

ScaleTransform 180

SkewTransform 183

RotateTransform 186

Opacity Masks 188

Putting It All Together — Combining Effects 191

Bouncing Ball with Reflection Example 191

Animated Image Viewer Example 197

Summary 203

Chapter 7: Custom Controls 205

Overview 206

Control Base Classes 207

The UserControl Class 207

Creating a User Control 207

Data Binding in WPF 217

Binding Markup Extensions 217

Binding Modes 217

Data Templates 219

Data Conversions 221

Creating and Editing Styles 222

Specifying a Style’s Target Type 223

Inheriting and Overriding Styles 224

Style Triggers 226

Customizing Existing Controls with Templates 228

Summary 231

Chapter 8: Using WPF in the Enterprise 233

WPF Application Models 234

Standalone Applications 235

Browser-Based Applications 238

Security Considerations 247

State Management 248

Application Object 248

Isolated Storage 250

State Management Example 252

Navigation 258

Elements of Navigation 258

Structured Navigation 259

Navigation Topologies 269

Application Localization 286

Automatic Layout Guidelines 287

Using Grids for Flexibility 289

Localization Attributes and Comments 290

WPF Deployment Models 291

Building Applications 292

Deploying Standalone Windows Applications 294

Deploying XAML Browser Applications 295

Deploying the .NET Framework 3.0 Runtime 296

Summary 298

Chapter 9: Security 299

WPF Security Model 299

Trusted Versus Express Applications 300

Core OS Security 300

LUA 301

Virtualization 301

Sandboxing 301

Cryptography Next Generation 302

CLR Security 302

Code Access Security 303

The Critical Code Methodology 311

Verification 313

Microsoft Internet Explorer Security 313

Zone Restrictions 313

XBAP Sandbox Workarounds 314

XAML Browser Application Security 315

ClickOnce Security 323

Trusted Publishers 323

Personal Certificate File 324

.NET 3.0 Security Utilities 327

Summary 328

Chapter 10: WPF and Win32 Interop 329

Win32 User Interface Overview 330

How WPF and HWNDs Interoperate 330

Using Win32 HWNDs Inside of WPF 331

Hosting a Win32 Button in WPF 332

Using WPF in Win32 Applications 335

Adding Windows Forms Controls to WPF 337

Adding Your WindowsFormsHost in Code 337

Adding Your HwndHost in XAML 339

Adding ActiveX Controls to WPF 339

Adding the ActiveX Control in XAML 344

Adding WPF Controls to Windows Forms 345

Affecting Control Properties 349

Summary 351

Chapter 11: Advanced Development Concepts 353

WPF Architecture 354

Core Subsystems 356

WPF Threading Model 359

Desktop Window Manager 360

The WPF Framework 361

Dispatcher Object 362

DependencyObject/DependencyProperty 362

Application 363

Freezable 364

Visual 364

UIElement 370

FrameworkElement 371

Control 371

A Deeper Look at XAML 373

XAML Under the Hood 373

Manipulating XAML On-the-Fly 378

Deconstructing Window1.xaml 382

x:Class 383

XAML Markup Extensions 385

XAML and Custom Types 386

WPF Multithreading 388

Single-Threaded Application Model 388

Thread Affinity and DispatcherObject 389

WPF Dispatcher 390

Working with Single-Threaded Applications 391

Asynchronous Threading 393

Windows Communication Foundation 397

Service Orientation 397

WCF Architecture 398

WCF Fundamentals 399

Building a WCF Service 402

Windows Workflow Foundation 409

Workflow Defined 410

WF Architecture 411

WF Fundamentals 411

Summary 427

Index 429

Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star


4 Star


3 Star


2 Star


1 Star


Your Rating:

Your Name: Create a Pen Name or

Barnes & Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation


  • - By submitting a review, you grant to Barnes & and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Terms of Use.
  • - Barnes & reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously

    If you find inappropriate content, please report it to Barnes & Noble
    Why is this product inappropriate?
    Comments (optional)