How can I find UIElement in WPF? -


How do I get the first element (grid element) in each window? I need window kids But I do not want to use "Visualstate Heller". Thanks for your help.

This is a solution that will do all this statically, you can call it from anywhere .

  using System.Windows; ... /// & lt; Summary & gt; /// goes to the child & lt; See cref = "System.Windows.Grid" /> Examples of all windows that they have in the form of first child /// & lt; / Summary & gt; /// & lt; Returns & gt; A count of Tuples connecting window instances with the hair grid. & Lt; / Returns> Public stable IEnumerable & lt; Tuple & LT; Window, grid & gt; & Gt; GetAllGrids () {foreach (var windows in the application window. Current world) {grid grid = it. Content in the form of grids; // The grid will be zero if the first grid is not the first grid (grid! = Null) {yield returns tupal.create (window, grid); }}}  

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -