【发布时间】:2017-03-30 14:58:56
【问题描述】:
我对 WPF 很陌生,只是想请你帮忙,以获取一种非常基本的方法来获取 Windows 控件及其子项,就像在 Winform 应用程序中一样。底线是为不同类中的多个窗口/页面提供可重用的代码。
之前非常感谢。
Public Sub GetControl(Wn As Window)
For Each Ctrl As Control In Wn.Controls
'Code here
If Ctrl.HasChildren = True Then
'Code here
End If
Next
End Sub
【问题讨论】: