Code Bye

禁用PictureEdit右键菜单

PictureEdit 控件默认可以在运行时更改图片,如果不希望右键操作,只显示图片,可以禁用右键菜单。在线文档如下:

A picture edit control provides a context menu used to perform common operations such as copying, pasting, loading and saving of images. Use the RepositoryItemPictureEdit.ShowMenu property to control whether the menu is displayed when users right-click a picture editor. The RepositoryItemPictureEdit.ShowZoomSubMenu option specifies whether the context menu contains zoom-related menu commands. When the zoom sub-menu is enabled, an end-user can also zoom the image via the mouse and keyboard. See RepositoryItemPictureEdit.ShowZoomSubMenu to learn more.

代码设置时为:pictureEdit.Properties.ShowMenu = false;


CodeBye 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明禁用PictureEdit右键菜单