Today, I would like to share with you a bunch of code that is able to find the first control with a given name. With this code, you do not have to bother with XAML namespace (like with FindControl ) and it will go through the entire hierarchy for you. I use it in WorldMonger to display tutorials in top of given controls: The code: public static FrameworkElement GetChildByNameRecursively( this FrameworkElement current, string name)
{
if (current.Name == name)
return current;
// App Bars...(read more)
↧