Click here to Skip to main content
15,885,164 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I have 10 charts in tile control layout and outside tile layout i have a button called print. when i click print button i need all charts which is inside tile layout control to get printed and also save to PDF.

I have tried the below code but its not working please help.
XML
<Button Name="button_PrintPreview" Click="button_PrintPreview_Click" >Print Preview</Button>

<dxlc:TileLayoutControl  Name="FulltileLayout">

//here i have 10 charts
</dxlc:TileLayoutControl>


C#
private void button_PrintPreview_Click(object sender, RoutedEventArgs e)
{
    PrintDialog printDialog = new PrintDialog();
    if (printDialog.ShowDialog() == true)
    {
        printDialog.PrintVisual(FulltileLayout, "Printing");
    }              
}
Posted
Updated 7-Dec-15 1:01am
v2
Comments
Richard Deeming 7-Dec-15 9:58am    
"It's not working" is not enough information for anyone to diagnose the problem.

Click "Improve question" and update your question with a proper description of the problem. Include the full details of any exception you are getting, and remember to indicate which line in the code is throwing the exception.

Remember, we can't see your screen, access your computer, or read your mind!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900