Hi,
I've got a xaml of a window with an unnamed border control somewhere inside. The border control uses an attached property that I wrote and the attached property basically sets the border control's Name property to a known value, like "placeholder". After the window is loaded, it tries to find that border control through the name that attached property gave it.
The problem is that it doesn't seem to work. Window.FindName returns null. Any ideas?
Edit: The border control does get named before the Window.FindName gets called, so it's not that it hasn't been named in time.
As an alternate solution, I was thinking of just going through the window's children and find the one that uses my attached property. How would I do that?
Thanks!