public static INTERNAL_ITextContainer FromOwner(DependencyObject parent)
        {
            INTERNAL_TextContainer container = null;

            if (parent is TextBlock)
            {
                container = new INTERNAL_TextContainerTextBlock((TextBlock)parent);
            }
            else if (parent is Span)
            {
                container = new INTERNAL_TextContainerSpan((Span)parent);
            }
            else if (parent is RichTextBlock)
            {
                container = new INTERNAL_TextContainerRichTextBlock((RichTextBlock)parent);
            }
            else if (parent is Paragraph)
            {
                container = new INTERNAL_TextContainerParagraph((Paragraph)parent);
            }
            else if (parent is Section)
            {
                container = new INTERNAL_TextContainerSection((Section)parent);
            }
            return(container);
        }
        public static INTERNAL_ITextContainer FromOwner(DependencyObject parent)
        {
            INTERNAL_TextContainer container = null;

            if (parent is TextBlock)
            {
                container = new INTERNAL_TextContainerTextBlock((TextBlock)parent);
            }
            else if (parent is Span)
            {
                container = new INTERNAL_TextContainerSpan((Span)parent);
            }
            return(container);
        }