# MiniToolbarOpeningEventArgs Class

> The MiniToolbarOpeningEventArgs class provides data for the TextControl.MiniToolbarOpening event of a Windows Forms TextControl. This event occurs to handle displaying context sensitive mini toolbars. The MiniToolbarContext property informs for which context the mini-tooolbar will be opened. Depending on that context the pre-defined mini toolbar TextMiniToolbar or ObjectMiniToolbar are provided by the MiniToolbar property.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Class
- **Introduced:** 25.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WinForms.SDK` (assembly `TXTextControl.Windows.Forms.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.Windows.Forms.dll` from the setup
- **Inherits:** `System.ComponentModel.CancelEventArgs`
- **Path:** TX Text Control .NET for Windows Forms > Reference > TXTextControl > MiniToolbarOpeningEventArgs Class
- **759 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/minitoolbaropeningeventargs/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/minitoolbaropeningeventargs/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/minitoolbaropeningeventargs/llms-full.txt

---

### Description

The MiniToolbarOpeningEventArgs class provides data for the [TextControl.MiniToolbarOpening](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/minitoolbaropening-event/llms-full.txt) event of a Windows Forms [TextControl](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/llms-full.txt). This event occurs to handle displaying context sensitive [mini toolbars](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/minitoolbar/llms-full.txt). The [MiniToolbarContext](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/minitoolbaropeningeventargs/minitoolbarcontext-property/llms-full.txt) property informs for which context the mini-tooolbar will be opened. Depending on that context the pre-defined mini toolbar [TextMiniToolbar](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textminitoolbar/llms-full.txt) or [ObjectMiniToolbar](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/objectminitoolbar/llms-full.txt) are provided by the [MiniToolbar](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/minitoolbaropeningeventargs/minitoolbar-property/llms-full.txt) property.

### Syntax

```csharp
public class MiniToolbarOpeningEventArgs : CancelEventArgs
```

```vbnet
Public Class MiniToolbarOpeningEventArgs
    Inherits CancelEventArgs
```

### Examples

The following example uses `MiniToolbarOpeningEventArgs.MiniToolbarContext` while handling `MiniToolbarOpening`.

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

```vbnet
AddHandler textControl.MiniToolbarOpening,
    Sub(sender, e)
        Console.WriteLine($"Mini Toolbar Context: {e.MiniToolbarContext}")
    End Sub
```

---

## In This Section

- [MiniToolbarOpeningEventArgs.Location Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/minitoolbaropeningeventargs/location-property/llms-full.txt): Gets the location, in pixels, where the mini toolbar is displayed. The coordinates are relative to the top-left corner of the screen.
- [MiniToolbarOpeningEventArgs.MiniToolbar Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/minitoolbaropeningeventargs/minitoolbar-property/llms-full.txt): Gets or sets the mini toolbar, which will be shown. To completely suppress a mini toolbar, the Cancel Property must be set to true. The property's value is of the type MiniToolbar.
- [MiniToolbarOpeningEventArgs.MiniToolbarContext Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/minitoolbaropeningeventargs/minitoolbarcontext-property/llms-full.txt): Gets the context in the document for which a mini toolbar will be opened. The content, which will be shown, depends on this context. The property value can be a combination (bitwise or) of the ContextMenuLocation values.

---

## Nearby

- **Previous:** [MiniToolbarInitializedEventArgs.MiniToolbar Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/minitoolbarinitializedeventargs/minitoolbar-property/llms-full.txt)
- **Next:** [MiniToolbarOpeningEventArgs.Location Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/minitoolbaropeningeventargs/location-property/llms-full.txt)
