开发者

PrintDocument doesn't work properly when to print multiple pages in silverlight,

I've coded to print a number of user controls in silverlight and it may be across multiple pages. So I took a look at the follow开发者_运维百科ing link, and it worked brilliantly.

http://channel9.msdn.com/learn/courses/Silverlight4/SL4BusinessModule6/SL4LOB_06_02_MultipagePrinting/

But when I try to print huge data, let's say, it provides more than 10 pages, printing doesn't work properly as I expected. It prints out several blank pages after 5h or 6th page.

My code is pretty much same as the link above. My user control is kind of huge though, printing with small data works properly.

Could anyone know why it prints some blank pages out?

Thanks in advance, Yoo

Edit

After some digging, I noticed my previous explanation was wrong. Not printing several blank pages after some pages, but some controls are printed like Visibility = INVISIBLE for some reason. I don't really understand what's going on.


Seems I found the reason why some controls are not printed. My user control uses a border having the following effect.

<Border Margin="10" CornerRadius="5" BorderThickness="1" Background="#FFFCFCFC" BorderBrush="#FF46494E">
        <Border.Effect>
            <DropShadowEffect BlurRadius="10" ShadowDepth="5" Direction="315" />
        </Border.Effect>

If I commented out that tag, all the controls would be printed as I expected. I don't know why it causes such an annoying bug, but now I'm freed from hell so it's okay for now.

Yoo

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜