Forget about extending WPF data-binding support

Databinding in WPF is implemented in the Binding class, which in principle looks like just a MarkupExtension. A MarkupExtension is a core piece of XAML markup "magic". It's rather simple, though:

public abstract class MarkupExtension
{
    // Methods
    protected MarkupExtension();
    public abstract object ProvideValue(IServiceProvider serviceProvider);
}




You're supposed to return a value to assign to the property that is using the markup extension, such as:

<TextBox Text="{l:MyMarkup}" />

A binding markup extension does a LOT more...

Read full article

No Comments