Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic How to add header, footer, legend to diagram? (Read 2471 times)
David Adams
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 11
Joined: Aug 6th, 2014
How to add header, footer, legend to diagram?
May 29th, 2015 at 7:44am
Print Post  
Hi,

I have a requirement to add a header, footer, and legend to diagrams (swim lanes layout and tree map layout) and I was wondering if there are any built-in features I could use to achieve this, or if anyone has done this before and can point me in the right direction.

Thanks,
DA

  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How to add header, footer, legend to diagram?
Reply #1 - May 29th, 2015 at 8:53am
Print Post  
Hi,

If you don't need these elements to scroll together with diagram contents, you could implement them in outer Xaml code:

Code
Select All
<StackPanel>
  <header here />
  <ScrollViewer>
    <Diagram/>
  </ScrollViewer>
  <footer here />
</StackPanel> 



If they should scroll, you could implement them using nodes inside the diagram (e.g. TableNode or TemplatedNode), with Locked and IgnoreLayout properties set to true.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
David Adams
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 11
Joined: Aug 6th, 2014
Re: How to add header, footer, legend to diagram?
Reply #2 - Jun 2nd, 2015 at 1:02pm
Print Post  
Thanks Stoyan.

Using Locked and IgnoreLayout properties set to true is the solution I need and that works for the diagram on screen.

I also need to export the diagram to PDF and I find that sometimes those elements are not included in the PDF. Any suggestions for resolving that?

DA
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How to add header, footer, legend to diagram?
Reply #3 - Jun 3rd, 2015 at 10:53am
Print Post  
This will work for PDF only if you export to a single page using PdfExporter.PageSize = DiagramSize. There's no way to make same header and legend nodes appear on every page if exporting to multiple pages. You might try paginating the diagram yourself, creating a DiagramPage for each A4-sized part, adding header and legend nodes to each page, and exporting using Export(DiagramDocument) overload. For next release we could implement some method to let you adorn the WPF Visual objects generated by exporter for each page with your own graphics for headers, legends, watermarks, etc.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint