WPF 창에서 유형별로 모든 컨트롤 찾기 윈도우의 모든 컨트롤을 유형별로 찾을 수 있는 방법을 찾고 있습니다. 예: 모두 찾기TextBoxes특정 인터페이스 등을 구현하는 모든 컨트롤을 찾습니다.이렇게 하면 효과가 있습니다. public static IEnumerable FindVisualChildren(DependencyObject depObj) where T : DependencyObject { if (depObj == null) yield return (T)Enumerable.Empty(); for (int i = 0; i < VisualTreeHelper.GetChildrenCount(depObj); i++) { DependencyObject ithChild = VisualTreeHelper.Ge..