Windows Presentation Foundation 4.5 Cookbook
Formats:
save 15%!
save 37%!
Free Shipping!
| Also available on: |
|
- Full of illustrations, diagrams, and tips with clear step-by-step instructions and real world examples
- Gain a strong foundation of WPF features and patterns
- Leverage the MVVM pattern to build decoupled, maintainable apps
Book Details
Language : EnglishPaperback : 464 pages [ 235mm x 191mm ]
Release Date : September 2012
ISBN : 184968622X
ISBN 13 : 9781849686228
Author(s) : Pavel Yosifovich
Topics and Technologies : All Books, Cookbooks, Enterprise, Microsoft
Table of Contents
PrefaceChapter 1: Foundations
Chapter 2: Resources
Chapter 3: Layout and Panels
Chapter 4: Using Standard Controls
Chapter 5: Application and Windows
Chapter 6: Data Binding
Chapter 7: Commands and MVVM
Chapter 8: Styles, Triggers, and Control Templates
Chapter 9: Graphics and Animation
Chapter 10: Custom Elements
Chapter 11: Threading
Index
- Chapter 1: Foundations
- Introduction
- Creating custom type instances in XAML
- Creating a dependency property
- Using an attached property
- Creating an attached property
- Accessing a static property from XAML
- Creating a custom markup extension
- Handling routed events
- Chapter 2: Resources
- Introduction
- Using logical resources
- Dynamically binding to a logical resource
- Using user-selected colors and fonts
- Using binary resources
- Accessing binary resources in code
- Accessing binary resources from another assembly
- Managing logical resources
- Chapter 3: Layout and Panels
- Introduction
- Creating a table-like user interface
- Dynamically sizing grid rows/columns
- Creating a scrollable user interface
- Creating a border around panels and elements
- Placing elements in exact positions
- Adding/removing elements to a panel dynamically
- Creating a tabbed user interface
- Implementing drag-and-drop
- Chapter 4: Using Standard Controls
- Introduction
- Working with text
- Using content controls
- Displaying images
- Creating tooltips
- Creating a list of items
- Creating a standard menu
- Creating a context menu
- Selecting options with checkboxes and radio buttons
- Manipulating tab order and focus
- Chapter 5: Application and Windows
- Introduction
- Creating a window
- Creating a dialog box
- Using the common dialog boxes
- Creating ownership between windows
- Creating a custom shaped window
- Creating a single instance application
- Handling an unhandled exception
- Chapter 6: Data Binding
- Introduction
- Element to element binding
- Binding to a single object
- Binding to a collection
- Using data templates
- Using value converters
- Creating a master-detail view
- Sorting and filtering bound collections
- Grouping bound collections
- Binding to multiple properties
- Binding hierarchical data to a TreeView
- Presenting data in a grid
- Validating data
- Chapter 7: Commands and MVVM
- Introduction
- Using routed commands
- Implementing a basic MVVM application
- Building a simple MVVM framework
- Building a complete MVVM style application
- Creating an undo/redo system
- Chapter 8: Styles, Triggers, and Control Templates
- Introduction
- Creating and using styles
- Applying a style automatically
- Creating a property trigger
- Using data triggers
- Creating an event trigger
- Creating a multi trigger
- Using behaviors
- Replacing the control template of a progress bar
- Replacing the control template of a scroll bar
- Customizing selection in a Selector control
- Chapter 9: Graphics and Animation
- Introduction
- Creating a custom shape
- Applying transforms on elements
- Manipulating a bitmap programmatically
- Creating adorners
- Creating property-based animations
- Creating path-based animations
- Creating custom animations
- Adding animation easing to animations
- Using custom effects with pixel shaders
- Chapter 10: Custom Elements
- Introduction
- Creating a user control
- Handling standard commands in a user control
- Creating a custom (templated) control
- Customizing a default template of custom control
- Creating a custom panel
- Creating a lightweight custom element
- Chapter 11: Threading
- Introduction
- Updating the UI from a non-UI thread
- Adding cancelation support
- Using the BackgroundWorker component
- Adding cancelation and progress with BackgroundWorker
- Using a timer to do periodic updates
- Using C# 5.0 to perform asynchronous operations
Pavel Yosifovich
Code Downloads
Download the code and support files for this book.
Submit Errata
Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.
Errata
- 1 submitted: last submission 26 Dec 2012Errata type: Technical Page No: 8
The definition of the abbreviation XAML should be:
eXtensible Application Markup Language
Sample chapters
You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.
- Get tips and insights to maximize your productivity
- Learn to build complex and flexible user interfaces using XAML
- Perform lengthy operations asynchronously while keeping the UI responsive
- Get well-versed with WPF features such as data binding, layout, resources, templates, and styles
- Customize a control’s template to alter appearance but preserve behaviour
Windows Presentation Foundation (WPF) provides developers with a unified programming model for building rich Windows smart client user experiences that incorporate UI, media, and documents.
WPF has become the leading technology for developing rich client applications on the Windows platform, packed with features and capabilities. However, WPF is big; in fact, it’s huge, causing a steep learning curve for the beginner and even for those already using some WPF features.
Windows Presentation Foundation 4.5 Cookbook provides clear recipes for common WPF tasks. It includes detailed explanations and code examples for customizing and enhancing the basic scenarios, while gaining a deep understanding of WPF mechanics and capabilities.
WPF is different and requires a different mind-set and approach. This book provides recipes and insights not only in its design but also its practical implementation details.
Starting from the foundations of WPF, such as dependency properties and XAML, the book touches on all major WPF aspects, such as controls and layout, resources, and digs deep into its unprecedented data binding capabilities.
The book shows data and control templates in action, which allow full customizations of displayed data and controls in a declarative way. Supported by styles and resources makes data binding all the more powerful. The Model View View-Model pattern is presented as an effective way of maximizing decoupling of components, while providing an elegant way of expanding applications while maintaining a tight grip on complexity.
The later parts discuss custom elements and controls – the ultimate customization mechanism, and looks at multithreading issues, and how .NET 4.5 task parallelism features can enhance application performance.
This book is written in an easy-to-read style, with a strong emphasis on real-world, practical examples. Step-by-step explanations are provided for performing important tasks.
If you are C# developer looking forward to increasing your understanding and knowledge of WPF, then this is the best guide for you. Basic experience with Visual Studio 2010 is mandatory, as well as good C# skills. Previous experience with Windows Forms is not required.

