WPF: Why TOO SLOW to get PrintDialog.PrintableAreaWidth and .PrintableAreaHeight?

I am experiencing a WPF-related PrintDialog issue - Windows XP64 + VS2010.

It's incredible that getting the PrintDialog.PrintableAreaWidth or .PrintableAreaHeight property is very small.

//cm. code examples below - be sure to include "using System.Windows.Controls"

PrintDialog pd = new PrintDialog();
double pw = pd.PrintableAreaWidth;    // set a break-point here, very slow, why???  
double ph = pd.PrintableAreaHeight;

Anyone have any ideas on this? I appreciate any thoughts!

+1
source share
1 answer

PrintableArearefers to the actual printer used - your application must contact the printer to get this information, and I assume that the reason it is slowing down. It should not be faster in WinForms ...

, , .

+2

All Articles