SetSource() public method

public SetSource ( [ source ) : void
source [
return void
        async void OnPrintTaskSourceRequestedHandler(PrintTaskSourceRequestedArgs args)
        {
            var deferral = args.GetDeferral();

            await this.Dispatcher.RunAsync(CoreDispatcherPriority.Normal,
                () =>
                {
                    this.document = new PrintDocument();

                    this.document.Paginate += OnPaginate;
                    this.document.GetPreviewPage += OnGetPreviewPage;
                    this.document.AddPages += OnAddPages;

                    // Tell the caller about it.  
                    args.SetSource(this.document.DocumentSource);
                });
            deferral.Complete();
        }
Exemplo n.º 2
0
 private void OnPrintTaskSourceRequested(PrintTaskSourceRequestedArgs args)
 {
     args.SetSource(_documentSource);
 }