PrintDialog - Selection

What is the right way to use pages and “selection” capabilities of the printdialog window ?

I write this :

PrintDialog oDlg = new PrintDialog();
            oDlg.PageRangeSelection = PageRangeSelection.AllPages;
            oDlg.UserPageRangeEnabled = true;
            if (oDlg.ShowDialog() == true)

but even if I select some nodes before calling print,
I have this :

Should I make my own printdialog window ?

— edit
I think more about all of that and I realize I probably mix the “page layout” and “print options” questions.

Probably, i need to develop a “page layout” window to choose, orientation, scale options, margins and so on.

I have ideqs to apply scale or margins or personnalized header/footer, Is it possible to configure your printmanager with orientation ?


I’m assuming you are only talking about WPF.

The PrintManager doesn’t know anything about portrait/landscape orientation or many other possible printer-specific features. You just need to customize the PrintDialog that is passed to the PrintManager.Print method. I haven’t tried it, but I believe you need to set the PrintDialog.PrintTicket.PageOrientation.