C# 클래스 PrintSample.DisablePreviewPrintHelper

This class customizes the standard PrintHelper in order to disable print preview.
The PrintTaskRequestedMethod sets printTask.IsPreviewEnabled to false in order to disable print preview. Since print preview is disabled, the Paginate event will not be raised. Instead, the pages to be printed are generated in response to the AddPages event.
상속: PrintSample.PrintHelper
파일 보기 프로젝트 열기: unoplatform/Uno.Windows-universal-samples 1 사용 예제들

공개 메소드들

메소드 설명
DisablePreviewPrintHelper ( PrintSample.Page scenarioPage ) : SDKTemplate

보호된 메소드들

메소드 설명
AddOnePrintPage ( RichTextBlockOverflow lastRTBOAdded, PrintPageDescription printPageDescription ) : RichTextBlockOverflow

This function creates and adds one print page to the internal cache of print pages pages stored in printPages.

AddPrintPages ( object sender, AddPagesEventArgs e ) : void

This is the event handler for PrintDocument.AddPages. It provides all pages to be printed, in the form of UIElements, to an instance of PrintDocument. PrintDocument subsequently converts the UIElements into a pages that the Windows print system can deal with.

PrintTaskRequested ( PrintManager sender, PrintTaskRequestedEventArgs e ) : void

This is the event handler for PrintManager.PrintTaskRequested. In order to ensure a good user experience, the system requires that the app handle the PrintTaskRequested event within the time specified by PrintTaskRequestedEventArgs.Request.Deadline. Therefore, we use this handler to only create the print task. The print settings customization can be done when the print document source is requested.

메소드 상세

AddOnePrintPage() 보호된 메소드

This function creates and adds one print page to the internal cache of print pages pages stored in printPages.
protected AddOnePrintPage ( RichTextBlockOverflow lastRTBOAdded, PrintPageDescription printPageDescription ) : RichTextBlockOverflow
lastRTBOAdded RichTextBlockOverflow Last RichTextBlockOverflow element added in the current content
printPageDescription PrintPageDescription Printer's page description
리턴 RichTextBlockOverflow

AddPrintPages() 보호된 메소드

This is the event handler for PrintDocument.AddPages. It provides all pages to be printed, in the form of UIElements, to an instance of PrintDocument. PrintDocument subsequently converts the UIElements into a pages that the Windows print system can deal with.
protected AddPrintPages ( object sender, AddPagesEventArgs e ) : void
sender object PrintDocument
e AddPagesEventArgs Add page event arguments containing a print task options reference
리턴 void

DisablePreviewPrintHelper() 공개 메소드

public DisablePreviewPrintHelper ( PrintSample.Page scenarioPage ) : SDKTemplate
scenarioPage PrintSample.Page
리턴 SDKTemplate

PrintTaskRequested() 보호된 메소드

This is the event handler for PrintManager.PrintTaskRequested. In order to ensure a good user experience, the system requires that the app handle the PrintTaskRequested event within the time specified by PrintTaskRequestedEventArgs.Request.Deadline. Therefore, we use this handler to only create the print task. The print settings customization can be done when the print document source is requested.
protected PrintTaskRequested ( PrintManager sender, PrintTaskRequestedEventArgs e ) : void
sender PrintManager PrintManager
e PrintTaskRequestedEventArgs PrintTaskRequestedEventArgs
리턴 void