As the property name of this setting is, it is used to hide the icon display of the PDF toolbar, not the context menu
. And if you don't want the user to save as or print through the menu function in the right mouse button, you can try disabling this menu with this line of code:
webView.CoreWebView2.Settings.AreDefaultContextMenusEnabled = false;
Or you can try referring to this thread to override the context menu. But this also doesn't completely prevent users from saving as or printing. They can still be done with keyboard shortcuts such as Ctrl+S
or Ctrl+P
.
Best regards,
Xudong Peng
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.