PrintTaskSourceRequestedArgs 클래스

정의

PrintTaskSourceRequestedHandler 대리자와 연결된 인수입니다. 인쇄할 콘텐츠를 PrintTask에 전달하는 메서드를 제공합니다.

public ref class PrintTaskSourceRequestedArgs sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class PrintTaskSourceRequestedArgs final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class PrintTaskSourceRequestedArgs
Public NotInheritable Class PrintTaskSourceRequestedArgs
상속
Object Platform::Object IInspectable PrintTaskSourceRequestedArgs
특성

Windows 요구 사항

디바이스 패밀리
Windows 10 (10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox에서 도입되었습니다.)
API contract
Windows.Foundation.UniversalApiContract (v1.0에서 도입되었습니다.)

설명

PrintTaskSourceRequestedArgs는 인쇄할 콘텐츠의 원본을 설정하는 데 사용됩니다. 다음은 SetSource 메서드를 보여 주는 UWP 인쇄 샘플의 코드 조각입니다.

protected virtual void PrintTaskRequested(PrintManager sender, PrintTaskRequestedEventArgs e)
{
    PrintTask printTask = null;
    printTask = e.Request.CreatePrintTask("C# Printing SDK Sample", sourceRequested =>
    {
        // Print Task event handler is invoked when the print job is completed.
        printTask.Completed += async (s, args) =>
        {
            // Notify the user when the print operation fails.
            if (args.Completion == PrintTaskCompletion.Failed)
            {
                await scenarioPage.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
                {
                    MainPage.Current.NotifyUser("Failed to print.", NotifyType.ErrorMessage);
                });
            }
        };

        // Call PrintTaskSourceRequestedArgs.SetSource
        sourceRequested.SetSource(printDocumentSource);
    });
}

이 시나리오 및 기타 인쇄 시나리오에 대한 자세한 내용은 인쇄UWP 인쇄 샘플을 참조하세요.

속성

Deadline

인쇄 작업 원본 요청의 최종 기한을 나타내는 DateTime 개체를 가져옵니다.

메서드

GetDeferral()

Complete 메서드에 대한 액세스를 제공하는 PrintTaskSourceRequestedDeferral 개체를 가져옵니다. 이 메서드는 지연이 끝났다는 것을 나타냅니다.

SetSource(IPrintDocumentSource)

인쇄할 콘텐츠의 인쇄 작업에 알릴 수 있습니다.

적용 대상