Quantcast
Channel: MSDN Blogs
Viewing all articles
Browse latest Browse all 35736

Tips and Tricks for C# Metro developer: How to find a XAML control by its name

$
0
0
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)

Viewing all articles
Browse latest Browse all 35736

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>