WPF - C# - Print a XAML Datagrid - multiplie Pages -
xaml - code:
<grid name="label"> <grid.rowdefinitions> <rowdefinition height="60"/> <rowdefinition height="*"/> </grid.rowdefinitions> <grid.columndefinitions> <columndefinition width="75" /> <columndefinition width="*" /> </grid.columndefinitions> <label content="text" grid.row="0" grid.column="0" /> <label content="text" grid.row="1" grid.column="0" /> <label content="text" grid.row="0" grid.column="1" /> <label content="text" grid.row="1" grid.column="1" /> </grid>
now want print label. when use function "printvisual" in loop printer stops after each label 1 - 2 seconds.
therefore tested code example doesen't work.
fixeddocument doc = new fixeddocument(); pagecontent pc = new pagecontent(); doc.pages.add(pc); fixedpage page = new fixedpage(); pc.child = page; (int = 1; <= int.parse(tbcount.text); i++) { page.children.add((uielement)label); } printdialog.printdocument(doc.documentpaginator, "labels");
the error thrown when label added page.
Comments
Post a Comment