WPF Multi threading with TPLHelper

The TPLHelper library is awesome. I use it frequently in many apps to handle threading stuff for me.

For instance, you can set it up like so to fire up a task and then handle finish tasks and even an exception in a task. The following example shows calling a method called LoadDictionaryItems on a seperate thread.

(more…)

WPF: Databinding case

Sometimes when you whip out a view and the databinding, the data does not show up.Always check the VS details in the Output window. This is what i found the other day:System.Windows.Data Error: 40 : BindingExpression path error: ‘Id’ property not found on ‘object’ ”DatabaseImplementationEntity’ (HashCode=61890310)’. BindingExpression:Path=Id; DataItem=’DatabaseImplementationEntity’ (HashCode=61890310); target element is ‘TextBlock’ (Name=”); target property is ‘Text’ (type ‘String’)

So, the Id field was not found. Thats because its really the ID field. I wish they would make it non case sensitive.

WPF/Silverlight: Buttons and Content

I really love the Content property of many controls in XAML. The button is one that uses the Content property instead of a Text property. That gives us the ability to put almost anything into the Buttons content. For instance,check out this:

(more…)

WPF: VS2010 Data Window

Another cool VS 2010 feature! Open the data window and create a data connection like you would in VS 2008. Then drag and drop an item onto a WPF form and viola, you now have a layout with a nice bound data grid. Add one or so lines of code and boom a working form.

This is a really nice way to get something going in WPF and making our life much easier.