Skip to main content

WPF Programmer's Reference: Windows Presentation Foundation with C# 2010 and .NET 4



WPF Programmer's Reference: Windows Presentation Foundation with C# 2010 and .NET 4

Rod Stephens

ISBN: 978-0-470-63207-9 May 2010 624 Pages


Build effective user interfaces with Windows Presentation Foundation

Windows Presentation Foundation (WPF) is included with the Windows operating system and provides a programming model for building applications that provide a clear separation between the UI and business logic. Written by a leading expert on Microsoft graphics programming, this richly illustrated book provides an introduction to WPF development and explains fundamental WPF concepts.

Packed with helpful examples, this reference progresses through a range of topics that gradually increase in their complexity. You’ll quickly start building applications while you learn how to use both Expression Blend and Visual Studio to build UIs. In addition, the book addresses the needs of programmer who write the code behind the UI and shows you how operations can be performed using both XAML and C#.

Topics Covered:

Overview of WPF
WPF in Visual Studio
Expression Blend
Common Properties
Content Controls
Layout Controls
User Interaction Controls
Two-Dimensional Drawing Controls
Pens and Brushes
Events and Code-Behind
Styles and Property Triggers
Event Triggers and Animation
Themes and Skins
Data Binding
Transformations and Effects
Navigation-Based Applications
Three-Dimensional Drawing

Even if you only have a minimal amount of experience, by the end of the book, you will be able to build dynamic and responsive user interfaces with WPF.

Introduction xxvii

Chapter 1: WPF Overview 1

Chapter 2: WPF in Visual Studio 21

Chapter 3: Expression Blend 37

Chapter 4: Common Properties 61

Chapter 5: Content Controls 73

Chapter 6: Layout Controls 101

Chapter 7: User Interaction Controls 119

Chapter 8 Tw o-Dimensional Chapter 8: Drawing Controls 145

Chapter 9: Properties 153

Chapter 10: Pens and Brushes 165

Chapter 11: Events and Code-Behind 179

Chapter 12: Resources 193

Chapter 13: Styles and Property Triggers 213

Chapter 14 Event Triggers a Chapter 14: and Animation 235

Chapter 15: Templates 263

Chapter 16: Themes and Skins 283

Chapter 17: Printing 303

Chapter 18: Data Binding 317

Chapter 19: Commanding 347

Chapter 20: Transformations and Effects 359

Chapter 21: Documents 367

Chapter 22: Navigation-Based Applications 379

Chapter 23: Three-Dimensional Drawing 387

Chapter 24: Silverlight 407

Appendix A: Common Properties 417

Appendix B: Content Controls 425

Appendix C: Layout Controls 443

Appendix D: User Interaction Controls 461

Appendix E: MediaElement Control 487

Appendix F: Pens 493

Appendix G: Brushes 495

Appendix H: Path Mini-Language 507

Appendix I: XPath 511

Appendix J: Data Binding 519

Appendix K: Commanding Classes 525

Appendix L: Bitmap Eff ects 533

Appendix M: Styles 535

Appendix N: Templates 539

Appendix O: Triggers and Animation 549

Appendix P: Index of Example Programs 555

Index 573

Read Me file
VB Src Chapters 1-12
C_Src Chapters 1-12
VB Src Chapters 13-24
C_Src Chapters 13-24
VB Src Intro_Appendixes
C_Src Intro_Appendixes
ChapterPageDetailsDatePrint Run
3Error in Code
Downloadable code, Chaper 3, project: MissonBriefing
Window1.xaml file line 6 should be "x:class="MissionBriefing.window1"
The namespace was missing.

267Error in Code
The TextBlock shows TextWrapping="Wrap" however the text below it states "The border contains a TextBlock with TextWrapping = True..." where it shown also state TextWrapping = "Wrap".
Should read:
The Border contains a TextBlock with TextWrapping = Wrap, so it wraps its content if necessary.