I would like to disable the button in question.
My code is:
<DocumentViewer x:Name="viewerDocument"
Document="{Binding GeneratedDocument}" />
and the preview is as follows

and the " /> and the " /> and the "/>
I would like to disable the button in question.
My code is:
<DocumentViewer x:Name="viewerDocument"
Document="{Binding GeneratedDocument}" />
and the preview is as follows

Copyright © 2021 Jogjafile Inc.
You would have to override the default template (DocumentViewer ControlTemplate Example) or subclass
DocumentViewerto override theDocumentViewerBase.OnPrintCommandmethod and call theDocumentViewerBase.CancelPrintmethod from the override.You can also find the print button in the visual tree and set
UIElement.IsEnabledtofalse.The following example shows how to get the print button to disable it:
MainWindow.xaml
MainWindow.xaml.cs