Prompted by a recent comment on the T4 Metadata Generation template article, which I released some weeks ago, I have implemented a new mechanism for concatenating property paths. This allows compile time validation of properties that exist on composite or nested members.
The Binding object needs to get its data from somewhere, and there are a few ways to specify the source of the data like using Source property directly in the Binding, inheriting a DataContext from the nearest element...
Reflection.Emit is very powerful tool. It creates IL code and since C# is converted into IL too, we have the same functionality as in C# and even more. It is very powerful and at the same time very complicated. Because of that it is worth to discuss how and for what it should be used.
It is critically important to make sure that a View's DataContext is properly created and attached before the underlying Window is displayed, otherwise initial events will be missed.
Hands on Lab for MVVM, Value Converter, XAML Binding, Delegate Command pattern, INotifyPropertyChange, Lambda Expression, LINQ etc. in Silverlight/WPF project
Reusability and factorizing are maybe the most commons things you want and use when you are developing applications. In WPF it often means creating controls library (i don’t mean UserControl) that will be easy to use in multiple applications.
Imagine for a second that you are writing an application like Outlook… let's call it MiMail.exe! This application is very basic and has 3 views that are relevant to me! I want to be able to see my mail, contacts and calendar!
Implementing field level change notification in WPF, and how a Lambda Expression can be used to specify a composite property that raises change notifications automatically whenever an associated property changes.
Mahhala (isiZulu word for free or without charge) is a new series that showcase some of the cool free WPF/Silverlight controls available… “You can learn a lot by reading other people's source code. That's the idea behind this series.
When you create WPF applications, you may (or you should !) use the M-V-VM pattern and so have to use/create ViewModel.The viewModel job is mainly to expose properties of your businessObjects to your views, ready for binding. Here is a first solution to create ViewModel from your model.
This post aims to provide a way to implement the Model View ViewModel (MVVM) architectural pattern using Plain Old CLR Objects (POCOs) while taking full advantage of .NET 4.0 DynamicObject Class.
I have seen so many people use FlowDocuments to create reports! This is really cool but what if you need a more complex reporting engine! Can it handle it? Can it be abstracted and reused! Do you have to start from scratch each time?
In this tutorial, I will take a practical example of a card game and illustrate how to model a playing card in WPF and define templates for defining visual aspect of the card as per the sign and the value of the card.
This article will guide you if you want to create your own custom ORM or a wrapper over the ORM. This is only for demo towards the Unit of work pattern with Repository and a singleton Session class.
IntroductionWith UWP and WinRT, Microsoft introduced a new means for localizability, which differs significantly from the method employed in Silverlight and .NET desktop apps.
In this post, we will learn about various font sizes defined in the default style library of Windows Phone 7, so you don't have to define them again and can reuse those styles which will be standard sizes all over any Phone 7 Application
Back in this post I showed you how you can easily add a fade-in / fade-out effect to a UIElement that changes its Visibility property, using a simple attached property.Some people encountered a problem using this property when they bind the UIElement to a model which initially hides the control.