Printing Confusion RRS feed

  • Question

  • I have a Win 8 App in C# that I need to print the results of a listview. I don't necessarily need to print the list but at least somehow print the data in a legible format that comprises the listview.

    Here is the C# code that produces the list contents itself.

    InventoryWatch.ServiceReference1.CARTSTATS[] arr1 = await myservice.GETCARTSTATSAsync(Convert.ToInt32(PASSET.SelectedValue));
                    statslistview.DataContext = arr1;
    How can I print what I need in a nice format. I am totally lost on the print function here.
    Friday, May 23, 2014 11:42 PM


  • You pass a Xaml element that describes the image you want printed. You can bind your data to a ListView and pass the ListView to PrintDocument.AddPage . The tricky part will be pagination if you have enough data for multiple pages.

    See Printing documentation and the Print Sample sample app

    Saturday, May 24, 2014 12:24 AM