Today I was looking for how to find the parent (container) user control in WPF.
As you can see from my browser history, I found a lot of duplicate questions which are proposing the same solution* (use this.Parent or VisualTreeHelper.GetParent(this) or LogicalTreeHelper.GetParent(this)
They all (except one) forgot to mention that "you need to place the code in the Initialized event handler" [source].
What is the best practice in this case? How can we avoid other people to get mad as I did?
*I forgot to say that I tried two approaches. Part of the questions relates to the other approach which was based on the parent UI element passing itself as a parameter to the child element.