You are creating a Windows Forms application by using the .NET Framework 3.5.
The Windows application will provide print functionality to the users. You implement the PrintPage page event for a form.
The users must be able to print the pages by using the Landscape orientation.
You need to ensure that the users can set the page settings before printing.
Which code segment should you use?
A.
PrintDocument printDocument1 = new PrintDocument();
PageSetupDialog PageSetupDialog1 = new PageSetupDialog();
printDocument1.DefaultPageSettings.Landscape = true;
PageSetupDialog1.ShowDialog();
B.
PrintDocument printDocument1 = new PrintDocument();
PageSetupDialog PageSetupDialog1 = new PageSetupDialog();
PageSetupDialog1.PageSettings.Landscape = true;
PageSetupDialog1.Document = printDocument1;
PageSetupDialog1.ShowDialog();
C.
PrintDocument printDocument1 = new PrintDocument();
PageSetupDialog PageSetupDialog1 = new PageSetupDialog();
printDocument1.DefaultPageSettings.Landscape = true;
PageSetupDialog1.Document = printDocument1;
PageSetupDialog1.ShowDialog();
D.
PrintDocument printDocument1 = new PrintDocument();
PageSetupDialog PageSetupDialog1 = new PageSetupDialog();
PageSetupDialog1.PrinterSettings.DefaultPageSettings.Landscape = true;
PageSetupDialog1.Document = printDocument1;
PageSetupDialog1.ShowDialog();