Table of Contents

Method GetParentOfType

Namespace
MigraDoc.DocumentObjectModel
Assembly
MigraDoc.DocumentObjectModel.dll

GetParentOfType(DocumentObject?, Type)

Gets a parent of the document object with the given type somewhere within the document hierarchy. Returns null if none exists.

public static DocumentObject? GetParentOfType(DocumentObject? documentObject, Type type)

Parameters

documentObject DocumentObject

The document object the parent is searched for.

type Type

The parent type to search for.

Returns

DocumentObject