TextContextMenu Property
- Namespace
TXTextControl.WPF
- Package
TXTextControl.asTextControl. WPF. SDK TXTextControl.from the private NuGet feed or Text Control Offline PackagesWPF. dll
Description
Gets or sets the context menu, which will be shown. The items depend on the document location where the mouse click occurs. The menu can be altered, extended or completely replaced. When this property is set to null, the WPF.TextControl uses system menu items. To completely suppress a context menu, the Cancel Property must be set the true.
Syntax
public ContextMenu TextContextMenu { get; set; }Public Property TextContextMenu As ContextMenuExamples
The following example uses TextContextMenuEventArgs.TextContextMenu to configure text context menu as part of the text context menu event args workflow. The configured value is checked before the workflow continues.
textContextMenuEventArgs.TextContextMenu = new System.Windows.Controls.ContextMenu();
if (textContextMenuEventArgs.TextContextMenu != null)
{
Console.WriteLine("Text Context Menu Event Args: Text Context Menu is available.");
}textContextMenuEventArgs.TextContextMenu = New System.Windows.Controls.ContextMenu()
If textContextMenuEventArgs.TextContextMenu IsNot Nothing Then
Console.WriteLine("Text Context Menu Event Args: Text Context Menu is available.")
End If