#pragma warning disable 1591 // Primary internal use, disable Warning CS1591: Missing XML comment for publicly visible type or member
/// <summary>
/// Gets the parent. Which tree the parent is retrieved from depends on the parameters.
/// </summary>
/// <param name="child">The child to get parent for.</param>
/// <param name="searchCompleteVisualTree">If true the parent in the visual tree is returned, if false the parent may be retrieved from another tree depending on the child type.</param>
/// <returns>The parent element, and depending on the parameters its retrieved from either visual tree, logical tree or a tree not strictly speaking either the logical tree or the visual tree.</returns>
/// Gets first parent element of the specified type. Which tree the parent is retrieved from depends on the parameters.
/// </summary>
/// <param name="child">The child to get parent for.</param>
/// <param name="searchCompleteVisualTree">If true the parent in the visual tree is returned, if false the parent may be retrieved from another tree depending on the child type.</param>
/// <returns>
/// The first parent element of the specified type, and depending on the parameters its retrieved from either visual tree, logical tree or a tree not strictly speaking either the logical tree or the visual tree.
/// null is returned if no parent of the specified type is found.