static void PrintTaskSourceRequested(PrintTaskSourceRequestedArgs args) { IPrintDocumentSource source = null; // TODO How do we get from our text file to an IPrintDocumentSource??? args.SetSource(source); }
async void OnPrintTaskSourceRequested(PrintTaskSourceRequestedArgs args) { var def = args.GetDeferral(); await Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => { args.SetSource(printDoc.DocumentSource); }); def.Complete(); }
private async void OnPrintTaskSourceRequrested(PrintTaskSourceRequestedArgs args) { var def = args.GetDeferral(); await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => { args.SetSource(printDoc?.DocumentSource); }); def.Complete(); }
private void HandlePrintTaskSourceRequested (PrintTaskSourceRequestedArgs args) { // Called when a printer is selected from the printers list panel Debug.WriteLine("PrintTask Source Requested"); // Request a deferral to accommodate the async operation var deferral = args.GetDeferral(); // Set the document source for the current print job. // This MUST happen on the UI thread. _dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { args.SetSource(_printDocument.DocumentSource); // Complete the deferral to indicate completion deferral.Complete(); }); }
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; args.SetSource(this.document.DocumentSource); } ); deferral.Complete(); }
private void OnPrintTaskSourceRequested(PrintTaskSourceRequestedArgs args) { args.SetSource(_documentSource); }
private void PrintTaskSourceRequrested(PrintTaskSourceRequestedArgs args) { // Set the document source. args.SetSource(printDocSource); }
void OnPrintTaskSourceRequested(PrintTaskSourceRequestedArgs args) { args.SetSource(printDocumentSource); }
private void PrintTaskSourceRequested(PrintTaskSourceRequestedArgs args) { Debug.WriteLine("PrintTaskSourceRequested"); args.SetSource(printDocumentSource); }
private void OnPrintTaskSourceRequested(PrintTaskSourceRequestedArgs e) { e.SetSource(_document?.Source); }
private static void PrintTaskSourceRequrested(PrintTaskSourceRequestedArgs args) { args.SetSource(printDocSource); }