UIPrintInteractionController.PrintPageRenderer 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
如果已设置,请使用指定的 UIPrintPageRenderer 实例进行打印。
public virtual UIKit.UIPrintPageRenderer PrintPageRenderer { [Foundation.Export("printPageRenderer", ObjCRuntime.ArgumentSemantic.Strong)] get; [Foundation.Export("setPrintPageRenderer:", ObjCRuntime.ArgumentSemantic.Strong)] set; }
member this.PrintPageRenderer : UIKit.UIPrintPageRenderer with get, set
属性值
- 属性
注解
必须实现 的 UIPrintPageRenderer 子类,并将呈现器实例分配给 属性 PrintPageRenderer 。
// Get a reference to the singleton iOS printing concierge
UIPrintInteractionController printController = UIPrintInteractionController.SharedPrintController;
// Instruct the printing concierge to use our custom UIPrintPageRenderer subclass when printing this job
printController.PrintPageRenderer = new MyPrintPageRenderer (myData);
// Ask for a print job object and configure its settings to tailor the print request
UIPrintInfo info = UIPrintInfo.PrintInfo;
// B&W or color, normal quality output for mixed text, graphics, and images
info.OutputType = UIPrintInfoOutputType.General;
// Select the job named this in the printer queue to cancel our print request.
info.JobName = "Recipes";
// Instruct the printing concierge to use our custom print job settings.
printController.PrintInfo = info;
// Present the standard iOS Print Panel that allows you to pick the target Printer, number of pages, double-sided, etc.
printController.Present (true, PrintingCompleted);