View Model First Approach using Caliburn Micro

While it is possible to use both View Model First and View First approach while using Caliburn Micro, I personally feel one should stick to one single appraoch thoughout your application. Mixing the two approaches would impact the readability of code adversely. View Model First Approach In this post we will look at the ViewModel … Continue reading View Model First Approach using Caliburn Micro

WPF Validations using DataAnnotation and INotifyDataErrorInfo

DataAnnotations and INotifyDataErrorInfo provides an easy and cleaner way to implement validations in WPF ViewModels. Unlike IDataErrorInfo, INotifyDataErrorInfo allows you to raise multiple errors (there are many more features which makes it more interesting than IDataErrorInfo including making it possible to use asynchronous validations). This being a hands-on demonstration, we will keep the theoritical part … Continue reading WPF Validations using DataAnnotation and INotifyDataErrorInfo

Non-Blinking Caret in WPF Textbox

A recent question I came across recently was "How could one stop the caret in a WPF Textbox from blinking ?". My first instinct drove me in the direction of HideCaret method, but quickly realized WPF applications doesn't allow you to get the Handle for individual controls. It only provides handles for Windows. This was … Continue reading Non-Blinking Caret in WPF Textbox

Shaders with HLSL #03: Passing Additional Parameters

In previous parts of this series, we briefly discussed the need for Shaders and created our first Shader Program. In this subsequent part, we would be exploring on passing additional parameters to our Custom Shader. In previous example, we replaced entire color of applied Control with a single color. What if we need to replace … Continue reading Shaders with HLSL #03: Passing Additional Parameters

Shaders with HLSL #02 : Applying Shader to WPF Application

In the first part of series, we wrote our first Shader Program. Now it is time to compile it so that we could use it in our WPF Application. HLSL Compiler To compile your HLSL code to a format that could be used with .Net WPF application, you would require the fxc compiler. For Windows … Continue reading Shaders with HLSL #02 : Applying Shader to WPF Application

Shaders with HLSL #01 : Shaders with HLSL for WPF Developers

Complete Tutorial Series Shaders with HLSL #01 : Introduction to Shaders and HLSL Shaders with HLSL #02 : Applying Shader to WPF Application Shaders with HLSL #03 : Passing Additional Parameters In this first part of our tutorial, we will briefly enlighten ourselves on key concepts involving shaders and why it is required. We will also … Continue reading Shaders with HLSL #01 : Shaders with HLSL for WPF Developers

Caliburn.Micro #007 : Bootstrapper with Unity

Unity is one of the most commonly used IOC containers used by developers, and it would be unfair if I don't include it as a part of the Caliburn.Micro WPF Tutorials (Creating Bootstrappers).  This particular post is dedicated to building bootstrapper for Caliburn.Micro application using Unity as the IoC Container. The key for creating Bootstrappers … Continue reading Caliburn.Micro #007 : Bootstrapper with Unity

Invoke UIElement’s Focus() Method From ViewModel

One of the things WPF developers often notice is inability to SetFocus on a particular control from the ViewModel. This problem can be however easily resolved using an attached property. Let's examine the code. We will begin by writing an attached property, for the purpose of example, named as IsFocused. The sole objective of the … Continue reading Invoke UIElement’s Focus() Method From ViewModel