ApiExamples.ExPageSetup.PageBorderProperties C# (CSharp) Метод

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

private PageBorderProperties ( ) : void
Результат void
        public void PageBorderProperties()
        {
            //ExStart
            //ExFor:Section.PageSetup
            //ExFor:PageSetup.BorderAlwaysInFront
            //ExFor:PageSetup.BorderDistanceFrom
            //ExFor:PageSetup.BorderAppliesTo
            //ExFor:PageBorderDistanceFrom
            //ExFor:PageBorderAppliesTo
            //ExFor:Border.DistanceFromText
            //ExSummary:Creates a page border that looks like a wide blue band at the top of the first page only.
            Document doc = new Document();

            PageSetup ps = doc.Sections[0].PageSetup;
            ps.BorderAlwaysInFront = false;
            ps.BorderDistanceFrom = PageBorderDistanceFrom.PageEdge;
            ps.BorderAppliesTo = PageBorderAppliesTo.FirstPage;

            Border border = ps.Borders[BorderType.Top];
            border.LineStyle = LineStyle.Single;
            border.LineWidth = 30;
            border.Color = Color.Blue;
            border.DistanceFromText = 0;

            doc.Save(MyDir + @"\Artifacts\PageSetup.PageBorderTop.doc");
            //ExEnd
        }