You can get rid of the hard coding of control name in the code by providing some DependancyProperty and have the same code in controlLoaded or OnApplyTemplate function based on the DependancyProperty.
This DependancyProperty's sender will the candidate for .Focus() call.