How to enable printing on ShowCustomPopup()

479
2
Jump to solution
12-03-2021 05:16 PM
RogerAsbury
Occasional Contributor

Posting a question late on a Friday? My planning ahead skills need some work. 🙂

I've been using ShowCustomPopup() for a variety of features in an add-in I'm writing, for example to show various files (such as PDFs, JPGs and HTML pages) and one thing I've noticed is that in all of them the Print icon in the lower right-hand corner is always greyed out. I'm curious what I need to do in order for that feature to work. An example of how I'm invoking the popup is below:

List<string> sortedPhotos = ImageProcesses.OrderImages(photos);
var popups = new List<PopupContent>();
foreach (var photo in sortedPhotos)
{
    popups.Add(new PopupContent(new Uri(filePath + photo), photo));
}
mv.ShowCustomPopup(popups);

 

ImageProcesses.OrderImages() is just a utility I wrote to extract file names and put them in order. This code works to bring up a popup with a list of files. Clicking the file name shows the image in the popup. But I want to be able to print the image.

Can I utilize the print icon in the lower right, or do I need to write a custom control to print the image? I can't seem to find anything online explaining the icons in the lower right of the popup window...

--
Roger Asbury
Analyst/Programmer - Fairbanks North Star Borough
0 Kudos
1 Solution

Accepted Solutions
KirkKuykendall1
Occasional Contributor III

This works on my machine with 2.9 and my default printer configured for Microsoft print to pdf.

KirkKuykendall1_0-1638809176376.png

KirkKuykendall1_1-1638809236181.png

 

View solution in original post

0 Kudos
2 Replies
KirkKuykendall1
Occasional Contributor III

This works on my machine with 2.9 and my default printer configured for Microsoft print to pdf.

KirkKuykendall1_0-1638809176376.png

KirkKuykendall1_1-1638809236181.png

 

0 Kudos
RogerAsbury
Occasional Contributor

Checked my version and I was still back at 2.8.2. Updated to 2.9 and it started working as expected. Guess I need to pay more attention to when updated are issued. Thanks much!

--
Roger Asbury
Analyst/Programmer - Fairbanks North Star Borough
0 Kudos