Quantcast
Channel: Dev102.com » Binding
Browsing all 10 articles
Browse latest View live

Why Should You Use The x:key Attribute In WPF DataTemplates

We have all used WPF DataTemplates, but I bet most of you never gave thought to the meaning of the x:Key attribute. We all know the meaning of the DataType attribute, which determines to what type of...

View Article



Image may be NSFW.
Clik here to view.

Diagnose Assembly Binding Failures

Every one of us, software developers, experienced situations where the .Net Framework could not locate an assembly and ended up facing the TypeLoadException. These failures usually happen due to an...

View Article

Image may be NSFW.
Clik here to view.

How To Create a WPF Custom Context Menu

How would you like your WPF application to have a Context Menu like this: Well, It is not so hard. Here is how you do it: This is the Context Menu that was defined for this example: 1: <TextBox...

View Article

Image may be NSFW.
Clik here to view.

WPF Binding Converter Best Practices

Hi all As you all remember in my article about Custom WPF Context Menu I mentioned that my WPF Binding Converter was a singleton, and I promised to tell you why, so here comes the 3 ways I know of...

View Article

Image may be NSFW.
Clik here to view.

How To Create a WPF Template For a Generic Class

Have you ever tried to create a DataTemplate for a Generic Class? During last week I had to battle this issue and it is allot more complicated then it sounds. As far as I can tell Creating...

View Article


Image may be NSFW.
Clik here to view.

WPF Binding Converter Best Practices Continued

Hi In my previous post about WPF Binding Converters one of our readers (Thanks The Reddest) pointed our that a new converter instance is not created every time a call is made to the converter. I...

View Article

A Serialization Pitfall When Binding to a Serializable Object

Lately I have been playing around with serializing and deserializing of objects, and I stumbled upon a very weird behavior. I was trying to serialize a certain object that was implementing the...

View Article

Why Should You Always Locate Your Convertors In App.Xaml

Hi   Where do you locate your convertors? do you put them in the Window.Resources section? or in the UserControl they are being used for? Neither of these options is good. You should put it in the...

View Article


Image may be NSFW.
Clik here to view.

Property, Dependency Property and Threading

Hi   A while ago Shahar wrote an article about whether WPF Data Binding is Thread safe. Shahar’s findings were that Even if you change a property from a different thread the PropertyChanged event will...

View Article


Image may be NSFW.
Clik here to view.

Formatting Your WPF Data – String.Format Is In the House!

Hi   When working with WPF I always found myself thinking how to handle Data formatting when a WPF control was bound to it. Let’s look at the following example of a window with a TextBlock that...

View Article
Browsing all 10 articles
Browse latest View live




Latest Images