Gu.Wpf.Adorners
Gu.Wpf.Adorners copied to clipboard
Overlay.Info: bindings to DataContext don't work because it uses MS TemplatedAdorner
The issue is whenever you try to bind to the original datacontext from inside the Info adorner, it throws binding errors. After little investigations and source code decompilation, I figured out that internally MS TemplatedAdorner created a child and sets it's datacontext to validation errors.
I solved that by specifying DataContext inside the template using RelativeSource to the first Adorner element, but it would be great if you could take a look and improve a library, cause in the readme you specified that the DataContext will be of the underlying object which is not correct at this point. Also thanks a lot for such a useful library, I'm making some drawing tool with WPF and it helps me a lot!