Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法在 Windows Phone 中的 c# 中获取所有 xaml 标签(或任何其他标签)的列表而不给它们命名?
就像是 :
var list = this.GetElementsByTagName("Image");
你可以做这样的事情。
foreach(UIElement item in YourContainer.Children){ MessageBox.Show(item.GetType().ToString()); }
它会返回类似的东西System.Window.Control.Image
System.Window.Control.Image