TX Text Control .NET for Windows Forms

MiniToolbarOpening Event

Event|Introduced in 25.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.WinForms.SDK as TXTextControl.Windows.Forms.dll from the private NuGet feed or Text Control Offline Packages

Description

Occurs to handle displaying context sensitive mini toolbars. The event handler receives an argument of type MiniToolbarOpeningEventArgs containing data related to this event. The event itself is raised if the ShowMiniToolbar property is set to a value that is not MiniToolbarButton.None and the corresponding mouse button is raised.

Syntax

public event MiniToolbarOpeningEventHandler MiniToolbarOpening;

Examples

The following example records useful context when mini toolbar opening occurs.

textControl.MiniToolbarOpening += (sender, e) =>
{
    Console.WriteLine($"Mini Toolbar Context: {e.MiniToolbarContext}");
};

Remarks

It is recommended to handle this event for toggling the visibility of added or built-in context sensitive items of the TextMiniToolbar or ObjectMiniToolbar. Determining their structure should be handled by the TextControl.TextMiniToolbarInitialized or TextControl.ObjectMiniToolbarInitialized event. Furthermore the MiniToolbarOpeningEventArgs.MiniToolbar property can be used as an interface to set custom context sensitive mini toolbars.