Apress Access

Applied WPF 4 in Context

By Raffaele Garofalo

  • eBook Price: $34.99
Buy eBook Buy Print Book
Applied WPF 4 in Context shows developers that applications don't exist by themselves—they sit in the real world, with its attendant business challenges and requirements. This book shows how WPF technologies and best practices can be drawn together effectively to create powerful and elegant Windows applications.

Full Description

  • Add to Wishlist
  • ISBN13: 978-1-4302-3470-8
  • 352 Pages
  • User Level: Intermediate
  • Publication Date: May 23, 2011
  • Available eBook Formats: EPUB, MOBI, PDF

Related Titles

  • Windows 10 for the Internet of Things
  • DevOps on the Microsoft Stack
  • Practical Microsoft Visual Studio 2015
  • Develop Microsoft HoloLens Apps Now
Full Description

Applied WPF 4 in Context sets the standard for leveraging the latest Windows user interface technology in your business applications.

Using this book, you'll learn how to implement world-class Windows Professional Foundation (WPF) solutions in a real-world line of business applications, developing the code from the ground up, and understand how to apply best development practices and related .NET products and technologies to your solutions. You will cover designing and developing the application, testing and debugging, data access, reporting, and applying styles and themes to enhance the look of the user interface—all using WPF in a very practical, eminently useful context. You'll create asynchronous and parallel code, and learn how to distribute the application's components using Windows Communication Foundation (WCF). You'll also apply the Model-View-ViewModel pattern, again in a real-world WPF application.

Elegant and functional WPF applications are easier to create than ever before with Applied WPF 4 in Context.

What you’ll learn

  • XAML (the Extensible Application Markup Language) through hands-on practice
  • How to integrate Windows Forms, DirectX, ActiveX, and other non-WPF technologies into your WPF application
  • How to integrate WPF with report writers, such as Crystal Reports and SQL Server Reporting Services
  • How to access remote services on a server from the client machine using Windows Communication Foundation

Witness the development of a real line-of-business application from the ground up, from the design and analysis phase to the development and testing phase and, finally, how to deploy the application in a production environment, all using WPF and the latest development environment.

Who this book is for

This book is for Windows application developers who want to understand the context in which WPF sits and the standards and best practices that can be employed to improve the efficiency and maintainability of their projects. This book can be used by a junior developer to learn WPF and understand how to architect a layered application, and it can also be used by a senior developer as a reference for developing scalable WPF applications.

Note: If you'd like to contact the author, please do so via his blog, which you can find at http://blog.raffaeu.com.

Table of Contents

Table of Contents

  1. Introducing WPF and XAML
  2. Sample Application: Overview and Getting Started
  3. Microsoft Expression Blend
  4. Creating the Views
  5. Adding Controls to the Views
  6. The Entity Framework
  7. Data Binding
  8. Command Handling and Event Routing
  9. Testing with TDD
  10. Reports with Microsoft Reporting Services
  11. Deploying the Application Using ClickOnce
  12. Design Patterns in WPF
  13. WPF and Multi-Threading
  14. Interacting with WCF
Source Code/Downloads

Downloads are available to accompany this book.

Your operating system can likely extract zipped downloads automatically, but you may require software such as WinZip for PC, or StuffIt on a Mac.


If you think that you've found an error in this book, please let us know by emailing to editorial@apress.com . You will find any confirmed erratum below, so you can check if your concern has already been addressed.

On page Table of content in PDF book:
Could you please complete PDF for this book, table of content is missing, please download book and see how it looks
Author Comment:
The front of the book features the "Table of Contents at a Glance," while a more detailed table of contents follows the index at the back of the book, along with author information.

This is a stylistic approach we are employing on all current and forthcoming Apress titles.

On page 3:
Says: "Inside this namespace is a class called CustomPrefix that is available
using the prefix custom."
Should say: "Inside this namespace is a class called CustomClass that is available
using the prefix custom."

On page 26:

The bullet at the top of the page says "The version of VS 2010 used in this book is the Express version." However, page 35 instructs to create several projects. The UML Modelling Project is only available in VS 2010 Ultimate (not express).

I have VS 2010 Pro and was stuck on this step until I went searching on the web to find this fact out.

On page 29:

In Figure 2-1, I don't think the pictures in the each box correctly match up to their tier labels. If you read each row left to right it doesn't make sense. If you read each column top to bottom, then the tier labels make sense only if they are underneath each column.

On page 35:

Namespaces/Project names listed on Table 2-1 WPF Application Structure are not the same as those listed in Figure 2-5 at Page 37

On page 36:

Project [Apress.TimeTracker].ServiceLayer should be [Apress.TimeTracker].WCF to match its reference on following pages

On page 39:

"Right-click your Visual Studio solution, and choose Open Folder in Windows Explorer; this
command will open the root folder in the file system that contains the Visual Studio solution. Add a folder and call it Lib; inside this folder create three additional folders: 3rdParty, Microsoft, and Resources. If you have already downloaded the files mentioned in the “Tools and Software” section, you should already have all the files available in the file system; otherwise, you should download them now
or copy them from the Visual Studio solution available at Apress.com (simply search for the book using title, author, or ISBN, then look for the Book Resources tab). "

There is no such filse to download at the apress site, I mean no files for resources, and in fact no file for the complete project, the time tracker.
Author Comment:
Unfortunately, Mr. Garofalo has been unable to complete the full source code as of this time. However, he encourages readers who encounter serious roadblocks to contact him directly via his blog:


On page 50:

"To execute one of these commands you must select one or more object....."

It doesn't work if you only select one object. When you select at least two then the Combine menu function enables the commands. With only one item selected Combine is enable, but all the items in the sub-menu are disabled.

In other words it should read "two or more objects..."

On page 50:

On the page there is a list of available commands....
Exclude Overlap

In my version of Expression 4 the list goes....

Exclude Overlap

Note that the order has changed, and Extract has been renamed to Subtract.

On page 62:

From List 4-1

Wrong Code...
namespace TimeTrackerPrototy_e

Change to ...
namespace TimeTrackerPrototype

On page 71,72:

Wrong using clauses in Listing 4-4 and 4-5.

Should be "using System.Linq.Expressions; "

Expressions has to have an 's'. Text in book has no 's'.

On page 80:
Several times (e.g. page 80) there are references to the concrete implementation of the application as can be found on the Book Resources of the website.

However the current download doesn't seem to include the application source. E.g. for chapter 4 only the prototype source can be found. I cannot find the complete source as stated.

Author Comment:
Unfortunately, Mr. Garofalo has been unable to complete the full source code as of this time. However, he encourages readers who encounter serious roadblocks to contact him directly via his blog:


On page 90:

Coding listing 5-3 has
<ResourceDictionary Source="/Resources/CustomEffectsDictionary.xaml" />
in the App.xaml file.

However in the bullet points on page 89 the dictionary was called CustomControlsDictionary.xaml.

On page 108:



Also, code no longer available on codeplex. In fact I'm not sure where to get what is shown in 5-11

On page 129:

"Going back to the EF Designer, locate the association shape in the toolbox and select it; now your mouse cursor has the shape of a S."

More precisely, it only transforms into the S shape when you select the association in the toolbox AND you more your mouse over an existing entity in the model.

On page 138:

In the section titled Set Up the First Test Fixture there is this sentence:

"In your solution structure you should have a project of type Test called APRESS.Test; if you don’t have it, add a new project of type Test to the APRESS.TimeTracker solution and name it e."

Change '...name it e.'
to '...name it Test.'

On page 141:

You create the method StartTransaction in the UoW class, even though you've declared it as BeginTransaction in the interface on pg 136.

On page 144:

ObejctSet<T> should be ObjectSet<T>

On page 198:

Listing 8-8: the 2nd argument of MvvmCommand constructor should be (parameter)=> return true;


    1. Pro C# 5.0 and the .NET 4.5 Framework


      View Book

    2. Expert ASP.NET Web API 2 for MVC Developers


      View Book

    3. Machine Learning Projects for .NET Developers


      View Book

    4. Pro ASP.NET MVC 5 Platform


      View Book