Skip to main content

IModel.FindOwnerByClass method

Namespace: NextDesign.Core

Description

Gets the first owning instance of the specified class that holds this instance.

Traces the instance that owns this instance in the parent direction and returns the first instance of the specified class found. If the search to the top-level parent element does not find the corresponding instance, null is returned.

If the class specified in the class name cannot be found, null is returned. Also, when making an ambiguous match, if there are multiple matching classes, the instance of the first found class is returned.

argument

NameTypeDescription
classNamestringclass name
Specify the name of the class or the fully qualified name.
If null or an empty string is specified, the return value of this method will be null.
fuzzyboolclassName Whether to treat the argument as a class name rather than a fully qualified name.
If False, evaluate as specifying a class whose fully qualified name matches className.
If True, evaluate as specifying a class whose class name matches className.

The default value is True.

Return value