1
Vote

GenericAdorner sets wrong DataContext on AdornerElement

description

Following the WPF guidelines a datacontext is inherited through the tree, down to all FrameworkElement childs.
 
In GenericAdorner constructor, the DataContext is assigned to a UIElement instead of the DataContext of the adornered element.
 
m_AdornerElement.DataContext = m_AdornedElement;
 
Instead it should be:
 
if (m_AdornerElement.DataContext == null)
            m_AdornerElement.DataContext = m_AdornedElement.DataContext;
 
 
Viel Spaß und Danke
Andreas Kiepfer
Siemens AG

comments