# MainToolbarToggle(MainToolbarContent, bool, Action<bool>)

> Specify the content and function of a main toolbar toggle.

## Definition

* **Type:** Constructor
* **Namespace:** [UnityEditor.Toolbars](/engine/6000.7/script-reference/unityeditor/toolbars.md)
* **Assembly:** UnityEditor

```csharp
public MainToolbarToggle(MainToolbarContent content, bool value, Action<bool> valueChanged)
```

### Parameters

**** (\[MainToolbarContent]\(/engine/6000.7/script-reference/unityeditor/toolbars/maintoolbarcontent)): The visual content of the toggle.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): The state of the toggle:`On` or `Off`.**** (\[Action\<bool>]\(https\://learn.microsoft.com/dotnet/api/system.action)): The callback that receives the new state of the toggle when the user selects it.
