views:

37

answers:

1

I want to set up data binding using a custom component.

Basically, I'd like to do something like this in my XAML file:

<ControllerDataBindingBridge>
    <Bind TargetControl="eFirstName" Property="FirstName"/>
</ControllerDataBiondingBridge>

How do I create ControllerDataBindingBridge, there doesn't appear to be a simple Component which isn't visible, only UIElements.

Is this supported at all? I see things like Storyboard, that inherits from DependencyObject, is this the base class I want?

Any webpages, tutorials, hints, or tips anyone can give me towards achieving this?

+3  A: 

DependencyObject is the base class you want.

I'd start by having a look at the Expression Blend SDK (Behaviours and Triggers). See here for samples. The binding listener sample may prove useful.

Graeme Bradbury
Thanks, that was exactly what I needed, already built a dummy class In can add in my resource section with a collection of sub-items, works nicely.
Lasse V. Karlsen