FrameworkElement.Parent and VisualtreeHelper.GetParent behaves differently
In a WP7 app, I used FrameworkElement.Parent recursively to determine whether a specific element is inside of another element. But it does not always work correctly. Then I changed my code to use VisualtreeHelper.GetParent method recursively, and it always work correctly(so far as I tested). So what is the difference of them? Thanks Consider ControlA and ControlB where ControlA is a content control meaning it can contain other controls. <ControlA> <ControlB /> </ControlA> Logically the Parent property of the ControlB instance is an instance of ControlA in this case. However if you were to look