That depends, what are you willing to do with the TextBox
? With you are willing to access the Text value of it its fairly simple, you only need to bind it to a property from a class.
If you are willing to access other properties of it, I would create an attached property that mark the TextBox
for use elsewhere, so in the TextBox
you would add the AP and in the PropertyChangedCallback
add a custom logic to keep the reference to it.
Hope this helps, if doesn't tell me and I will try to help you out.
All best
Raul