c# - Screen and print layout for a XAML window -


i have rather complex wpf xaml window, represents printed form.

mainly, on top, there canvas @ size of a4 page. children of canvas lot of nested stackpanels, , again lots of labels, textblocks, textboxes, labels, check boxes, drop downs, etc.

i print window follows:

printdialog dlg = new system.windows.controls.printdialog(); if (dlg.showdialog() == true) {     dlg.printvisual(this.pagecanvas, "document"); } 

now, during print, want colors , borders of textboxes disappear. more, i'd replace textboxes , checkboxes textblocks.

a) there pre-built methods switching between "screen mode" , "print mode"?

b) or, otherwise, can exchange controls @ run time textblocks ?

i want avoid create 2 variants of same form (one screen, 1 print), because double future maintenance work.

well i'm thinking best thing create form , design in way u want when u click print button print form... don't forget databind objects.... easiest method use datastore.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -