Dreamine.UI.Wpf.Equipment 1.0.1
Dreamine.UI.Wpf.Equipment 사용자 인터페이스 기능과 구성 요소를 제공합니다.
로딩중...
검색중...
일치하는것 없음
Dreamine.UI.Wpf.Equipment.DreamineVirtualKeyboard.TreeHelper 클래스 참조

더 자세히 ...

정적 Public 멤버 함수

static IEnumerable< T > FindVisualChildren< T > (this DependencyObject dep)
static ? T FindFirstVisualChild< T > (this DependencyObject dep, string name)
static ? T FindFirstVisualChild< T > (this DependencyObject dep)
static T FindParent< T > (DependencyObject child)

상세한 설명

WPF 시각적 트리에서 자식과 부모 요소를 찾는 확장 메서드를 제공합니다.

TreeHelper.cs 파일의 14 번째 라인에서 정의되었습니다.

멤버 함수 문서화

◆ FindFirstVisualChild< T >() [1/2]

? T Dreamine.UI.Wpf.Equipment.DreamineVirtualKeyboard.TreeHelper.FindFirstVisualChild< T > ( this DependencyObject dep)
inlinestatic

지정한 형식에 일치하는 첫 시각적 후손을 찾습니다.

템플릿 파라메터
T찾을 프레임워크 요소 형식입니다.
매개변수
dep탐색 시작 객체입니다.
반환값
첫 일치 요소이며 없으면 null입니다.
타입 한정자들
T :FrameworkElement 

TreeHelper.cs 파일의 156 번째 라인에서 정의되었습니다.

156 : FrameworkElement
157 {
158 if (dep == null)
159 return null;
160
161 for (int i = 0; i < VisualTreeHelper.GetChildrenCount(dep); i++)
162 {
163 var child = VisualTreeHelper.GetChild(dep, i);
164
165 if (child is T t)
166 return t;
167
168 var result = FindFirstVisualChild<T>(child);
169 if (result != null)
170 return result;
171 }
172
173 return null;
174 }

다음을 참조함 : FindFirstVisualChild< T >().

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

◆ FindFirstVisualChild< T >() [2/2]

? T Dreamine.UI.Wpf.Equipment.DreamineVirtualKeyboard.TreeHelper.FindFirstVisualChild< T > ( this DependencyObject dep,
string name )
inlinestatic

지정한 이름과 형식에 일치하는 첫 시각적 후손을 찾습니다.

템플릿 파라메터
T찾을 프레임워크 요소 형식입니다.
매개변수
dep탐색 시작 객체입니다.
name일치시킬 요소 이름입니다.
반환값
첫 일치 요소이며 없으면 null입니다.
타입 한정자들
T :FrameworkElement 

TreeHelper.cs 파일의 104 번째 라인에서 정의되었습니다.

104 : FrameworkElement
105 {
106 if (dep == null)
107 return null;
108
109 for (int i = 0; i < VisualTreeHelper.GetChildrenCount(dep); i++)
110 {
111 var child = VisualTreeHelper.GetChild(dep, i);
112
113 if (child is T t && t.Name == name)
114 return t;
115
116 var result = FindFirstVisualChild<T>(child, name);
117 if (result != null)
118 return result;
119 }
120
121 return null;
122 }

다음을 참조함 : FindFirstVisualChild< T >().

다음에 의해서 참조됨 : FindFirstVisualChild< T >(), FindFirstVisualChild< T >().

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ FindParent< T >()

T Dreamine.UI.Wpf.Equipment.DreamineVirtualKeyboard.TreeHelper.FindParent< T > ( DependencyObject child)
inlinestatic

시각적 트리를 위로 탐색하여 지정한 형식의 첫 부모를 찾습니다.

템플릿 파라메터
T찾을 부모 형식입니다.
매개변수
child탐색을 시작할 자식 객체입니다.
반환값
첫 일치 부모이며 없으면 런타임 null입니다.
예외
InvalidOperationExceptionchild 가 유효한 Visual 또는 System.Windows.Media.Media3D.Visual3D가 아닐 때 발생할 수 있습니다.
타입 한정자들
T :DependencyObject 

TreeHelper.cs 파일의 216 번째 라인에서 정의되었습니다.

216 : DependencyObject
217 {
218 DependencyObject parentObject = VisualTreeHelper.GetParent(child);
219
220 while (parentObject != null)
221 {
222 if (parentObject is T parent)
223 return parent;
224
225 parentObject = VisualTreeHelper.GetParent(parentObject);
226 }
227
228 return null!;
229 }

◆ FindVisualChildren< T >()

IEnumerable< T > Dreamine.UI.Wpf.Equipment.DreamineVirtualKeyboard.TreeHelper.FindVisualChildren< T > ( this DependencyObject dep)
inlinestatic

지정한 형식의 모든 시각적 후손을 깊이 우선으로 반환합니다.

템플릿 파라메터
T찾을 종속성 객체 형식입니다.
매개변수
dep탐색 시작 객체입니다.
반환값
일치하는 후손의 지연 시퀀스입니다.
타입 한정자들
T :DependencyObject 

TreeHelper.cs 파일의 48 번째 라인에서 정의되었습니다.

48 : DependencyObject
49 {
50 if (dep == null)
51 yield break;
52
53 for (int i = 0; i < VisualTreeHelper.GetChildrenCount(dep); i++)
54 {
55 var child = VisualTreeHelper.GetChild(dep, i);
56 if (child is T t)
57 yield return t;
58
59 foreach (var childOfChild in FindVisualChildren<T>(child))
60 yield return childOfChild;
61 }
62 }

다음을 참조함 : FindVisualChildren< T >().

다음에 의해서 참조됨 : FindVisualChildren< T >().

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

이 클래스에 대한 문서화 페이지는 다음의 파일로부터 생성되었습니다.: