public static void PrintControl(IWin32Window owner, PictureEdit control) { using PrintingSystem ps = new PrintingSystem(); Link link = new Link(ps); ps.Links.Add(link); link.CreateDetailArea += (s, e) => { Rectangle rect = new Rectangle(Point.Empty, control.Image.Size); PrintCellHelperInfo info = new PrintCellHelperInfo( Color.Empty, e.Graph.PrintingSystem, control.EditValue, control.Properties.Appearance, control.Text, rect, e.Graph); e.Graph.DrawBrick((Brick)control.Properties.GetBrick(info), rect); }; using (new WaitCursor()) { link.CreateDocument(ps); } using var printTool = new PrintTool(ps); printTool.ShowRibbonPreview(owner, control.LookAndFeel); }
public void ShowRibbonPreview() { BarManager = PrintTool.PreviewRibbonForm.Ribbon.Manager; PrintTool.ShowRibbonPreview(); }