的DocumentViewer工具栏和上下文菜单

的DocumentViewer工具栏和上下文菜单

本文介绍了的DocumentViewer工具栏和上下文菜单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何隐藏默认的工具栏和不允许的的DocumentViewer 控件的默认上下文菜单?

How to hide the default toolbar and to disallow the default context menu of the DocumentViewer control?

推荐答案

您可以prevent默认的上下文菜单的出现被处理的ContextMenuOpening 事件,并设置 ContextMenuEventArgs.Handled 为true。

You can prevent the default context menu from appearing by handling the ContextMenuOpening event, and setting ContextMenuEventArgs.Handled to true.

对于工具栏,我不知道 - 也许你可以以某种方式改变DocumentView的默认样式不包括工具栏?我没有做过太多的时尚潮流,不过这可能是在那里我开始寻找。

As for the toolbar, I'm not sure - maybe you could somehow change the default style of the DocumentView to not include the toolbar? I haven't ever done much with styles, but that is probably where I'd start looking.

这篇关于的DocumentViewer工具栏和上下文菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 18:48