With PDFsharp it's up to you.
I presume you are using MigraDoc: With MigraDoc you can add a page header. Add paragraph.AddPageField()
for the current page number and paragraph.AddNumPagesField()
for the total page count.
Code snippet from the sample:
// Create a paragraph with centered page number. See definition of style "Footer".
Paragraph paragraph = new Paragraph();
paragraph.AddTab();
paragraph.AddPageField();
// Add paragraph to footer for odd pages.
section.Footers.Primary.Add(paragraph);
// Add clone of paragraph to footer for odd pages. Cloning is necessary because an object must
// not belong to more than one other object. If you forget cloning an exception is thrown.
section.Footers.EvenPage.Add(paragraph.Clone());
Code snippet that sets the tab stop (assuming DIN A 4 with a body with of 16 cm):
style = document.Styles[StyleNames.Footer];
style.ParagraphFormat.AddTabStop("8cm", TabAlignment.Center);
Both snippets taken from the linked site. Sample code is also available for download.