Unable to get none or other leader options

Hi @alexey.noskov,

I have attached file and document

List<int> lst = new List<int>();
TabStopCollection kk = doc.Styles[StyleIdentifier.Toc1].ParagraphFormat.TabStops;
if (kk.Count > 0)
{

    for (int i = 0; i < kk.Count; i++)
    {

        if (kk[i].Alignment == TabAlignment.Left)
        {
            flag = true;
            for (int j = 0; j < kk.Count; j++)
            {
                if (chLst[k].Check_Parameter != "None")
                {

                    flag = true;
                    allsubchecks = true;

                    chLst[k].QC_Result = "Failed";
                    chLst[k].Comments = "TOC1 - Lefttab leader is not in " + chLst[k].Check_Parameter + ".";

                }
                else if (chLst[k].Check_Parameter != ".....")
                {
                    flag = true;
                    allsubchecks = true;
                    chLst[k].QC_Result = "Failed";
                    chLst[k].Comments = "TOC1 - Lefttab leader is not in " + chLst[k].Check_Parameter + ".";

                }
                else if (chLst[k].Check_Parameter != "-----")
                {
                    flag = true;
                    allsubchecks = true;
                    chLst[k].QC_Result = "Failed";
                    chLst[k].Comments = "TOC1 - Lefttab leader is not in " + chLst[k].Check_Parameter + ".";

                }
                else if (chLst[k].Check_Parameter != "_____")
                {
                    flag = true;
                    allsubchecks = true;
                    chLst[k].QC_Result = "Failed";
                    chLst[k].Comments = "TOC1 - Lefttab leader is not in" + chLst[k].Check_Parameter + ".";

                }
                else
                {
                    chLst[k].QC_Result = "Passed";
                    chLst[k].Comments = "TOC1 - Lefttab leader is in " + chLst[k].Check_Parameter + ".";
                }

o-3.2.P.5.3 Validation of Analyt Procedures .docx (1.5 MB)

here i want to get none option after this chLst[k].Check_Parameter != “None” … iam try to using kk[i].leader but in this iam unable to get none or other leader options plz help me regarding this issue

@Syedfahad Unfortunately, your question is not clear enough. If you need to get or set leader type of tab stop, you can use TabStop.Leader property. The possible values of this property are listed in TabLeader enumeration.

Document doc = new Document(@"C:\Temp\in.docx");

// Reset tab leader of TOC1 style to None.
Style toc1 = doc.Styles[StyleIdentifier.Toc1];
for (int i = 0; i < toc1.ParagraphFormat.TabStops.Count; i++)
{
    TabStop stop = toc1.ParagraphFormat.TabStops[i];
    stop.Leader = TabLeader.None;
}

doc.Save(@"C:\Temp\out.docx");