views:

187

answers:

0

Hi!

Could I have, please, a little code-sample of WPF "attached behavior"?

I explain my problem:

I've done my TreeView all with XAML but now I'd like to manage an event with code-behind. The HierarchicalDataTemplate contains an Image. I need to capture the events MouseEnter / MouseLeave on the Image.

I'd like to do this with "attached behavior", but I don't know how.

Thank you! Pileggi