Pro WPF 4.5 in C#: Windows Presentation Foundation in .NET 4.5, Fourth Edition

Book description

Microsoft's Windows Presentation Foundation (WPF) provides you with a development framework for building high-quality user experiences for the Windows operating system. It blends together rich content from a wide range of sources and allows you unparalleled access to the processing power of your Windows computer.

Pro WPF 4.5 in C# provides a thorough, authoritative guide to how WPF really works. Packed with no-nonsense examples and practical advice you'll learn everything you need to know in order to use WPF in a professional setting. The book begins by building a firm foundation of elementary concepts, using your existing C# skills as a frame of reference, before moving on to discuss advanced concepts and demonstrate them in a hands-on way that emphasizes the time and effort savings that can be gained.

What you'll learn

  • Understand the fundamentals of WPF programming from XAML to controls and data flow.

  • Develop realistic application scenarios to see navigation, localization and deployment in action.

  • Explore the advanced user interface controls that WPF provides.

  • Learn to manage documents from within WPF: Text layout, printing, and document packaging are all covered.

  • Use graphics and multimedia to add punch to your applications

  • Who this book is for

    This book is designed for developers encountering WPF for the first time in their professional lives. A working knowledge of C# and the basic architecture of .NET is helpful to follow the examples easily, but all concepts will be explained from the ground up.

    Table of contents

    1. Title
    2. Dedication
    3. Contents at a Glance
    4. Contents
    5. About the Author
    6. About the Technical Reviewer
    7. Acknowledgments
    8. Introduction
    9. Part I: Fundamentals
      1. Chapter 1: Introducing WPF
        1. The Evolution of Windows Graphics
        2. WPF: A Higher-Level API
        3. Resolution Independence
        4. The Architecture of WPF
        5. WPF 4.5
        6. The Last Word
      2. Chapter 2: XAML
        1. Understanding XAML
        2. XAML Basics
        3. Properties and Events in XAML
        4. Using Types from Other Namespaces
        5. Loading and Compiling XAML
        6. The Last Word
      3. Chapter 3: Layout
        1. Understanding Layout in WPF
        2. Simple Layout with the StackPanel
        3. The WrapPanel and DockPanel
        4. The Grid
        5. Coordinate-Based Layout with the Canvas
        6. Layout Examples
        7. The Last Word
      4. Chapter 4: Dependency Properties
        1. Understanding Dependency Properties
        2. Property Validation
        3. The Last Word
      5. Chapter 5: Routed Events
        1. Understanding Routed Events
        2. Event Routing
        3. WPF Events
        4. Keyboard Input
        5. Mouse Input
        6. Multitouch Input
        7. The Last Word
    10. Part II: Deeper into WPF
      1. Chapter 6: Controls
        1. The Control Class
        2. Content Controls
        3. Specialized Containers
        4. Text Controls
        5. List Controls
        6. Range-Based Controls
        7. Date Controls
        8. The Last Word
      2. Chapter 7: The Application
        1. The Application Life Cycle
        2. Application Tasks
        3. Assembly Resources
        4. Localization
        5. The Last Word
      3. Chapter 8: Element Binding
        1. Binding Elements Together
        2. Binding to Objects That Aren’t Elements
        3. The Last Word
      4. Chapter 9: Commands
        1. Understanding Commands
        2. The WPF Command Model
        3. Executing Commands
        4. Advanced Commands
        5. The Last Word
      5. Chapter 10: Resources
        1. Resource Basics
        2. Resource Dictionaries
        3. The Last Word
      6. Chapter 11: Styles and Behaviors
        1. Style Basics
        2. Triggers
        3. Behaviors
        4. The Last Word
    11. Part III: Drawing and Animation
      1. Chapter 12: Shapes, Brushes, and Transforms
        1. Understanding Shapes
        2. Using Brushes
        3. Using Transforms
        4. Transparency
        5. The Last Word
      2. Chapter 13: Geometries and Drawings
        1. Paths and Geometries
        2. Drawings
        3. The Last Word
      3. Chapter 14: Effects and Visuals
        1. Visuals
        2. Effects
        3. The WriteableBitmap Class
        4. The Last Word
      4. Chapter 15: Animation Basics
        1. Understanding WPF Animation
        2. Basic Animation
        3. Storyboards
        4. Animation Easing
        5. Animation Performance
        6. The Last Word
      5. Chapter 16: Advanced Animation
        1. Animation Types Revisited
        2. Key-Frame Animation
        3. Path-Based Animation
        4. Frame-Based Animation
        5. Storyboards in Code
        6. The Last Word
    12. Part IV: Templates and Custom Elements
      1. Chapter 17: Control Templates
        1. Understanding Logical Trees and Visual Trees
        2. Understanding Templates
        3. Creating Control Templates
        4. Organizing Template Resources
        5. Building More Complex Templates
        6. Visual States
        7. The Last Word
      2. Chapter 18: Custom Elements
        1. Understanding Custom Elements in WPF
        2. Building a Basic User Control
        3. Creating a Lookless Control
        4. Supporting Visual States
        5. Creating Custom Panels
        6. Custom-Drawn Elements
        7. The Last Word
    13. Part V: Data
      1. Chapter 19: Data Binding
        1. Binding to a Database with Custom Objects
        2. Binding to a Collection of Objects
        3. Improving Performance in Long Lists
        4. Validation
        5. Data Providers
        6. The Last Word
      2. Chapter 20: Formatting Bound Data
        1. Data Binding Redux
        2. Data Conversion
        3. List Controls
        4. List Styles
        5. Data Templates
        6. The ComboBox
        7. The Last Word
      3. Chapter 21: Data Views
        1. The View Object
        2. Filtering, Sorting, and Grouping
        3. The Last Word
      4. Chapter 22: Lists, Trees, and Grids
        1. The ListView
        2. The TreeView
        3. The DataGrid
        4. The Last Word
    14. Part VI: Windows, Pages, and Rich Controls
      1. Chapter 23: Windows
        1. The Window Class
        2. Window Interaction
        3. Nonrectangular Windows
        4. Programming the Windows Taskbar
        5. The Last Word
      2. Chapter 24: Pages and Navigation
        1. Page-Based Navigation
        2. Page-Based Interfaces
        3. The Page History
        4. The Navigation Service
        5. XAML Browser Applications
        6. The WebBrowser Control
        7. The Last Word
      3. Chapter 25: Menus, Toolbars, and Ribbons
        1. Menus
        2. Toolbars and Status Bars
        3. Ribbons
        4. The Last Word
      4. Chapter 26: Sound and Video
        1. Playing WAV Audio
        2. The MediaPlayer
        3. The MediaElement
        4. Speech
        5. The Last Word
      5. Chapter 27: 3-D Drawing
        1. 3-D Drawing Basics
        2. Deeper into 3-D
        3. Interactivity and Animations
        4. The Last Word
    15. Part VII: Documents and Printing
      1. Chapter 28: Documents
        1. Understanding Documents
        2. Flow Documents
        3. Read-Only Flow Document Containers
        4. Editing a Flow Document
        5. Fixed Documents
        6. Annotations
        7. The Last Word
      2. Chapter 29: Printing
        1. Basic Printing
        2. Custom Printing
        3. Print Settings and Management
        4. Printing Through XPS
        5. The Last Word
    16. Part VIII: Additional Topics
      1. Chapter 30: Interacting with Windows Forms
        1. Assessing Interoperability
        2. Mixing Windows and Forms
        3. Creating Windows with Mixed Content
        4. The Last Word
      2. Chapter 31: Multithreading
        1. Understanding the Multithreading Model
        2. The BackgroundWorker
        3. The Last Word
      3. Chapter 32: The Add-in Model
        1. Choosing Between MAF and MEF
        2. Understanding the Add-in Pipeline
        3. Creating an Application That Uses Add-Ins
        4. Interacting with the Host
        5. Visual Add-Ins
        6. The Last Word
      4. Chapter 33: ClickOnce Deployment
        1. Understanding Application Deployment
        2. Setting Up a Simple ClickOnce Publication
        3. Additional ClickOnce Options
        4. The Last Word
    17. Index

    Product information

    • Title: Pro WPF 4.5 in C#: Windows Presentation Foundation in .NET 4.5, Fourth Edition
    • Author(s): Matthew MacDonald
    • Release date: November 2012
    • Publisher(s): Apress
    • ISBN: 9781430243656