I need to somehow loop through all controls on a UWP project's MainWindow. My first thought was that it would be a simple foreach on my window.Controls, but this doesn't exist in UWP.
I've browsed around and found a similar question here but this code didn't seem to work either when I tried it out. It looped successfully through the entire Window, only to find out that the objects found were none at all even though I could clearly see it going through the Grid and such.
Is there a way to do this in UWP using C#? I've tried to look for a VisualTreeHelper to do it, but no success on that either. Any help appreciated!