SharpLeaf Reference > SharpLeaf Methods > DrawElement Method

SharpLeaf.DrawElement Method

Draw an arbitrary PageElement on current page.

public void DrawElement(
    PageElement element
Element to draw.


   font = new FontType("Arial",72,FontStyle.Bold,Color.LightGray);
  // Create a text block from bottom-left to top-right (no wrapping)
   text = new TextBlock("Confidential",font,72,-72,-72,72,Alignment.Center,
   lf.DrawElement(text);  // Water-mark page with "Confidential"


Draws any arbitrary TextBlock, ImageBlock, Box, Rule or Frame on current page. Frames will only be drawn. To flow into it you need to call NextFrame(Frame) instead.

See also ...

PageElement Abstract Class | PageLayout Glossary | SharpLeaf Members

Send comments on this topic
© Dyalog Ltd 2016