Tony,
I know in WPF you can temporary add a Rotate Transformation (and possibly
scale?) to your Visual and then remove it after printing. Perhaps try that?
You need to find out if the original Transform property is set to a
GroupTransformation or not. If so, you can just add a new one to the group,
otherwise create a group and add the existing and then yours to it and add
it to the visual.
Something like the following should do it,
Transform cache = visual.Transformation;
RotateTransform rt = new RotateTransform(90, visual.ActualWidth / 2,
visual.ActualHeight / 2)
Boolean bAdded = false;
if(visual.Transformation is TransformGroup)
{
(visual.Transformation as TransformGroup).Children.Add(rt);
bAdded = true;
}
else
{
visual.Transformation = rt;
}
// print etc
if(bAdded)
{
(visual.Transformation as TransformGroup).Children.Remove(rt);
}
else
{
visual.Transform = cache;
}
--------------------------------------------------
From: <[email protected]>
Sent: Friday, June 18, 2010 2:48 PM
To: <[email protected]>
Subject: Printing in Silverlight
> Hi all,
>
> We have finally made the move to Silverlight 4. It was a hard slog,
> mainly due to third party
> control library issues, and we still have some styling issues, however
> we've made it.
>
> One of the key reasons that we made the move to Silverlight 4 was for its
> print functionality.
>
> So anyway, we have been setting up a few pages for printing. But we are
> hitting a stumbling block
> or two.
>
> Most screens are landscape, whilst most printers are set up for portrait
> printing. I have a report
> showing on a screen that needs to be printed landscape. When I set the
> PageVisual object to my
> page, and call print, it wants to print out the page using portrait
> orientation. I have not found a way
> to get it to change/default to landscape. Is there a way to do this?
>
> Regards,
> Tony
> _______________________________________________
> ozsilverlight mailing list
> [email protected]
> http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight
>
_______________________________________________
ozsilverlight mailing list
[email protected]
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight