ApiExamples.ExTabStopCollection.GetIndexByPositionEx C# (CSharp) Метод

GetIndexByPositionEx() приватный Метод

private GetIndexByPositionEx ( ) : void
Результат void
        public void GetIndexByPositionEx()
        {
            //ExStart
            //ExFor:TabStopCollection.GetIndexByPosition
            //ExSummary:Shows how to look up a position to see if a tab stop exists there, and if so, obtain its index.
            Document doc = new Document(MyDir + "Document.doc");
            Paragraph paragraph = (Paragraph)doc.GetChild(NodeType.Paragraph, 0, true);

            paragraph.ParagraphFormat.TabStops.Add(ConvertUtil.MillimeterToPoint(30), TabAlignment.Left, TabLeader.Dashes);

            // An output of -1 signifies that there is no tab stop at that position.
            Console.WriteLine(paragraph.ParagraphFormat.TabStops.GetIndexByPosition(ConvertUtil.MillimeterToPoint(30))); // 0
            Console.WriteLine(paragraph.ParagraphFormat.TabStops.GetIndexByPosition(ConvertUtil.MillimeterToPoint(60))); // -1
            //ExEnd
        }
    }