wpf-devexpress-dot-xpf-dot-richedit-dot-popupmenushowingeventargs-f94398ef.md
Indicates a document element for which the context menu is invoked.
Namespace : DevExpress.Xpf.RichEdit
Assembly : DevExpress.Xpf.RichEdit.v25.2.dll
NuGet Package : DevExpress.Wpf.RichEdit
public RichEditMenuType MenuType { get; }
Public ReadOnly Property MenuType As RichEditMenuType
| Type | Description |
|---|---|
| RichEditMenuType |
An enumeration member that specifies the menu type.
|
Available values:
Show 12 items
| Name | Description |
|---|---|
| Text |
Specifies a context menu invoked for text.
| | Hyperlink |
Specifies a context menu invoked for a hyperlink.
| | Field |
Specifies a context menu invoked for a field.
| | TableCell |
Specifies a context menu invoked for a table cell.
| | InlinePicture |
Specifies a context menu invoked for an inline picture.
| | FloatingObject |
Specifies a context menu invoked for a floating object - a picture or a text box.
| | TextBox |
Specifies a context menu invoked for a text box.
| | Comment |
Specifies a context menu invoked for a comment.
| | Header |
Specifies a context menu invoked for a header.
| | Footer |
Specifies a context menu invoked for a footer.
| | Footnote |
Specifies a context menu invoked for a footnote.
| | Endnote |
Specifies a context menu invoked for an endnote.
|
If a context menu is invoked for any document element except text, the MenuType property returns the following flag combination: RichEditMenuType.Text | RichEditMenuType enumeration value corresponding to the target element.
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the MenuType property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
wpf-rich-text-editor-customize-context-menu/CS/ContextMenuCustomization/MainWindow.xaml.cs#L26
private void RichEditPopupMenuShowing(object sender, PopupMenuShowingEventArgs e) {
if ((e.MenuType & RichEditMenuType.TableCell) != 0) {
wpf-rich-text-editor-customize-context-menu/VB/ContextMenuCustomization/MainWindow.xaml.vb#L27
Private Sub RichEditPopupMenuShowing(ByVal sender As Object, ByVal e As PopupMenuShowingEventArgs)
If(e.MenuType And RichEditMenuType.TableCell) <> 0 Then
' Remove the unnecessary buit-in items by their indices.
See Also
PopupMenuShowingEventArgs Class