printing - WPF: Why TOO SLOW to Get PrintDialog's .PrintableAreaWidth and .PrintableAreaHeight? -
i experiencing extremely wired wpf printdialog issue -- windows xp64 + vs2010.
it pretty unbelievable very slow printdialog's .printableareawidth or .printableareaheight property.
// see sample codes below - remember include "using system.windows.controls"
printdialog pd = new printdialog(); double pw = pd.printableareawidth; // set break-point here, slow, why??? double ph = pd.printableareaheight;
anyone has idea regarding this? appreciate thoughts!
the printablearea
refers actual printer in use - app has contact printer info, , guess that's reason why it's slow. shouldn't faster in winforms...
if you'd want optimize, cache printer name , it's defaults , use instead of querying printer each time.
Comments
Post a Comment