VisualFindVisualAndDescendantsAspectT Method |
Find the first aspect of type T on this visual or one of its descendents (children recursively)
Namespace: Demo3D.VisualsAssembly: Demo3D.Core (in Demo3D.Core.dll) Version: 19.00.00
Syntaxpublic T FindVisualAndDescendantsAspect<T>()
where T : class
Type Parameters
- T
- The aspect type to look for.
Return Value
TAn aspect of type T, or null if none found.
ExampleBBox GetBoundsVisualAndDescendants(Visual visual) {
return visual.FindVisualAndDescendantsAspect<IRenderable>()?.BoundingBox;
}
See Also