I have downloaded an example solution that uses the OverrideMetadata method of DefaultStyleKeyProperty of a control that inherits from usercontrol but does not have an .xaml design file, and that is going to be base control for other subcontrols with similar or almost same layout. The code can be found here Example.
Now I am trying to access from the base class to a button located in its content template of the overriden style, with the name of "btnTest1", but I cannot find the way to do this.
I would like to know if there is a way of finding the control in the base class constructor, or in the subclass constructor (maybe after calling InitializeComponent), because I need to have access to it in code-behind later.
Thanks in advance.
David.