locked
How to send image control to Print using c# RRS feed

  • Question

  • Hi 

    I want to send the image control for printing using c# Windows 8 store app , I use following event to add control to print document 

     private void PrintDoc_AddPages(object sender, AddPagesEventArgs e)
            {
                var pageCount = GetpageCount(); // here I get page count from my app
                for (int page = 0; page < pageCount; page++)
                  _printDoc.AddPage(new Viewbox { Child = GetPreviewPanel(page) ,Stretch = Stretch.Uniform});
                _printDoc.AddPagesComplete();
            }

    GetPreviewPanel - this function creates image control with the image source as a BitMapImage , but when the preview page is shown , it shows blank page. Could anyone suggest how to send the image control for printing.

    regards

    Friday, June 20, 2014 9:46 PM

Answers

  • Hi Mahesh,

    I think you could ref to the sample: Windows Store app Print sample. Where you can find how to print images.

    In your case, the preview page does not show any image, you should double check if the image is successfully display in the normal page.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Monday, June 23, 2014 6:11 AM
    Moderator