MCPcopy Create free account
hub / github.com/TranslucentTB/TranslucentTB / FindParent

Method FindParent

ExplorerTAP/visualtreewatcher.cpp:116–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114}
115
116wux::FrameworkElement VisualTreeWatcher::FindParent(std::wstring_view name, wux::FrameworkElement element)
117{
118 const auto parent = wux::Media::VisualTreeHelper::GetParent(element).try_as<wux::FrameworkElement>();
119 if (parent)
120 {
121 if (parent.Name() == name)
122 {
123 return parent;
124 }
125 else
126 {
127 return FindParent(name, parent);
128 }
129 }
130 else
131 {
132 return nullptr;
133 }
134}

Callers

nothing calls this directly

Calls 1

NameMethod · 0.45

Tested by

no test coverage detected