hi,
iam writing a custome paginator for flowdocument. i used Matrix Transform to set the position of the Condainervisual .suppose if i set the MatrixTransform as new MatrixTransform(1,0,0,1,0,140) that means that particular CondainerVisual
will start from offsety(140) and if i have a footer in my page the condense of that CondainerVisual will float over the footer because we r setting matrixTransform.offsety(140).how can i avoid this.can we set the size of condainervisual so that condense will only fit with that size and we can stop the data floating over the footer.
iam attaching the code .
public override DocumentPage GetPage(int pageNumber) {
DocumentPage source = paginator.GetPage(pageNumber);
DrawingVisual result = new DrawingVisual();
result.Children.Add(Header());
IContentHost contentHost = (IContentHost)source;
HostedElements(contentHost,result);
ContainerVisual body = new ContainerVisual();
body.Children.Add(source.Visual);
body.Transform = pageNumber == 0 ? new MatrixTransform(1,0,0,1,0,100) : new MatrixTransform(1,0,0,1,0,140);
result.Children.Add(body);
result.Transform = new TranslateTransform(margin.Width,margin.Height);
ContainerVisual footer = Footer(pageNumber);
footer.Transform = new MatrixTransform(1,0,0,1,0,820);
result.Children.Add(footer);
isPageBreak = true;
return new DocumentPage(result,size,source.BleedBox,source.ContentBox);
}
Regards,
sajith