Caliburn Micro 4.0 – Issue with EventAggregator

I have always like Caliburn Micro since I started using few years back. Of course had the opportunity to use it at work as well and that made it more likeable. But at the same time, I am not a huge fan of one of the latest changes that happened in v4.0, even though I … Continue reading Caliburn Micro 4.0 – Issue with EventAggregator

WPF Tips and Tricks 001: TargetNullValue and FallBackValue

In this series of WPF Tips and Tricks we will cover smaller but useful WPF features which would help in making our applications better. n this first part of WPF Tricks,we will examine two often ignored and less frequently properties of Binding class - TargetNullValue and FallBackValue. TargetNullValue Consider the following View and ViewModel. View … Continue reading WPF Tips and Tricks 001: TargetNullValue and FallBackValue

Single View for Multiple ViewModels in Caliburn Micro

One of the recent questions I saw in Stackoverflow involved a scenario wherein, the developer had to reuse the same View for different ViewModels. In his case, the ViewModels where subtypes of same BaseViewModel and hence it made sense to reuse the View. For example, Consider the following public class TempatureViewModel:VariableViewModel{} public class PressureViewModel:VariableViewModel{} public class HumidityViewModel:VariableViewModel{} … Continue reading Single View for Multiple ViewModels in Caliburn Micro

Embed external application inside WPF Application

A friend of mine wanted to embed a third party application within her WPF application. While at first I was slightly confused, a bit of googling made life easy. Center idea revolve around launching the third party application using the¬†Process¬†class and use the Win32 API methods to embed it within the client application. var process … Continue reading Embed external application inside WPF Application

More on debugging DependencyProperty

In the previous post on DependencyPropertyHelper, we explored one way of debugging the Dependency Properties. The DepedencyPropertyHelper provides you details on from which value provider the final value was calculated from. However, if you want to trace and ensure the binding has been set correctly, you could make use of PresentationTraceSources. For example, consider following binding. <Button … Continue reading More on debugging DependencyProperty

DependencyPropertyHelper.GetValueSource : Debugging Helper for Dependency Properties

DependencyPropertyHelper.GetValueSource is a great debugging aid in detecting the source of value of a Dependency Property. This is quite useful for WPF developers who might need to figure out the source which provides the current value for the Dependency Property. The DependencyPropertyHelper.GetValueSource returns a structure ValueSource which has 5 Properties. BaseValueSourceIsAnimatedIsCoercedIsCurrentIsExpression DependencyPropertyHelper.GetValueSource(buttonControl,CustomValueProperty) {System.Windows.ValueSource} BaseValueSource: Local IsAnimated: false IsCoerced: false IsCurrent: … Continue reading DependencyPropertyHelper.GetValueSource : Debugging Helper for Dependency Properties

Cheat Sheet for Path Markup Syntax

Path Markup Syntax provides a mini-language for describing complex collection of lines and curves. Make no mistake when describing it as mini-language - It is quite powerful and could reduces a lot of nested collection of Xaml elements into a single line. Having said so, I personally favour the Xaml Element way of constructing elements, mainly due … Continue reading Cheat Sheet for Path Markup Syntax

Why be wary of Value Coercion in Dependency Properties

If you are not quite familiar with Value Coercion, it allows you to change/correct value of a property, when it is assigned an unexpected value. This also allows you to ensure relative properties are also kept in sync or in other words, allows you to enforce relation between properties of an object. For example, Date … Continue reading Why be wary of Value Coercion in Dependency Properties

Circular Progressbar in WPF

One of the things I have been working recently required me to use a Circular Progress bar. Incidently, I was surprised there wasn't something useful in the WPF package, but it wasn't that hard to do at the hindsight. The core idea would be to draw two overlapping circles - one for the background circle … Continue reading Circular Progressbar in WPF

Fody and “OnPropertyChanged” – The Unusual behavior

As a WPF Developer, Fody has been an extremely vital component in my aresenal. It takes a lot of burden off me by injecting some of the boiler plate codes. Despite that, there is one unusually behavior of Fody, which I have difficulty in digesting. For demonstration, let us create an example View for ourselves. … Continue reading Fody and “OnPropertyChanged” – The Unusual behavior