VisualFindVisualAndAncestorsAspectsT Method |
Finds all aspects of type T on this visual or its ancestors.
Namespace: Demo3D.VisualsAssembly: Demo3D.Core (in Demo3D.Core.dll) Version: 19.00.00
Syntaxpublic IEnumerable<T> FindVisualAndAncestorsAspects<T>()
where T : class
Type Parameters
- T
- The aspect type to look for.
Return Value
IEnumerableTA collection of aspects of type T in the visual tree at this point and above.
Exampleint CountRenderablesVisualAndAncestors(Visual visual) {
return visual.FindVisualAndAncestorsAspects<PhysicsGeometryAspect>().Count();
}
See Also