Essential WPF

Browse by Tags

All Tags » Design (RSS)
Session – Advanced Topics for Building Large-Scale Applications with Microsoft Silverlight
In this session, John Papa talked about Silverlight application development patterns such as composite applications with Prism, developing using the Model-View-ViewModel (MVVM) pattern, and methods of implementing large, modular, multi-page applications within your team. Also he talked about frameworks created to help assist in rapid development using these patterns without sacrificing good application development patterns. MVVM is a pattern, there is no specific way to do it right. Also with Silverlight...
Blend Behaviors via Attached Properties – Part 2
In my previous post I’ve talked about Blend 3 attached behaviors, and explained how to use them. In this post I would like to dive into more details, explaining the differences between Triggers, Actions and Behaviors types and how to create custom triggers. Triggers and Actions Actually blend 3 attached behavior comes in two flavors: Triggers and Actions Behaviors You can think of triggers and actions as cause-and-effect relationships. Trigger represents the cause. For example we want to do something...
Blend Behaviors via Attached Properties – Part 1
Up until Blend 3, UI designers had difficult time prototyping a real functional UI. The main problem was the lack of behaviors. Creating a UI prototype that deals with navigation, window creation on event, animation on data changes etc, usually ends up with source code development. And when it comes to coding, UI designers had to have kind of developer colleague. XAML Tools Over time, developers (like me :) created many XAML extensions using both XAML Markup Extensions and the powerful Attached Property...
UI Virtualization vs. Data Virtualization (Part 1)
Part 2 Being an LOB, composite applications infrastructure junky lately, I’ve been working around with several data-binding models and mechanisms to bind the data with the view, in a very efficient way of course. Sometime it was easy, and sometime it was not! I have had to find several workarounds to overcome both architectural and performance issues. In this post I would like to concentrate on Data Virtualization, and to compare it with UI Virtualization, which are very similar, yet different aspects...
Composite Application Guidance for WPF (Prism) Tour - Part 2
In the first post of this series I generally wrote about Prism and how can it fit in WPF applications. In this second post I would like to introduce a Home Automation application UI, show how to design it as a monolithic application, talk about the disadvantages of a monolithic application, and finally show how to design it as a Composite Application. What is a Home Automation? "For some it may be something as simple as remote or automatic control of a few lights. For others, security may be...
Composite Application Guidance for WPF (Prism) Tour - Part 1
If I would be asked, “What are the best two things happened to Smart Client and Desktop Applications developers in the last two years” I certainly would say “Microsoft's WPF and Prism infrastructures”. WPF is the aircraft’s Engines, and Prism is the HAL and this makes us proud to be an aircraft pilots. But it’s not enough to just sitting in the cockpit, wearing a pilot suit. We should know how to control both. With this post I want to start a series of posts regards Composite Application Guidance...
Data Binding for Pure CLR Objects
WPF has a great support for handling data: Data Binding. Unfortunately, one of the elements you bind to (the target) must have a DependencyProperty (known as the target-property). What if you don't have a dependency property to bind to, or you just want to bind two CLR types? For example let say that you wrote an application for simulating a car. You may have a Car and a Speedometer classes. Let say that a car handles its own speed, hence the car has its own speed state exposed by a Speed property...
10 Reasons to Love XAML
Many of my customers and students ask me: What is XAML good for? Why do I have to write XAML if I can write WPF with code? So I decided to write a post about it, sorted by the most important to the less essential. 1. It’s the Designer best friend WPF is not just about another UI platform, it’s also a methodology. It provides new tools and concepts for creating a modern presentation layer. Programmers write code, but when it comes to drawing…, OMG! To overcome this problem, a new member is introduced...
WPF Model Data Binding - Part II
In my previous post I showed how to design a data model which provides the following characteristics: Property notification changes In-memory state persistency Commit and Rollback mechanism Dirty flag In this post I will show how to handle multi-threading scenarios with WPF data binding. You can download the complete code from here . Before I will start, I want to give a little background of the WPF threading model, and to explain why you shouldn't change any data-bind object from a different thread...
WPF Model Data Binding - Part I
The Data Binding concept, first introduced with Windows Forms, provides a way for decoupling the View from the Data and for eliminating the boilerplate, mass code of marshaling the data to and from the view. WPF extends this mechanism by adding some great features, especially when dealing with Data Templates, which provides an easy way for reflecting the data with view. In WPF, Data Binding is everywhere! Data binding is a great mechanism, but there are some situations that data-binding not exactly...
WPF is O.O, Control Templates are not!
The best feature in WPF, which I very appreciate, is that WPF is a real O.O framework. Its services are exposed as a pile of polymorphic types, having common base classes and interface implementation. As every aspect in the real life (especially in software), not everything is perfect and so is WPF. One of the things that I'm a little disappointed with is Control Templates. The big Why Control Template is a strong mechanism in WPF. With Control Templates, a control’s logic is totally separated from...
WPF - Good Design Principles
Last few days, I saw a WPF Video Post that demonstrates how to start a blast graphic effect, based on image series. See this link . Yap, this is a very cool blast, but IMHO this is not the right way to go with WPF. The tips bellow will help you to redesign the application correctly, using WPF fundamentals. Tip 1: Design your model/data to support Data Binding (provide property for almost everything). Do not forget that data-binding in WPF is everywhere! Tip 2 : Do not hesitate to use Dependency Properties...