This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /guides/maui/user-interface/main-toolbar/remove-a-tool.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. Remove a tool from toolbar in MAUI PDF viewer | Nutrient

Nutrient MAUI SDK comes with a customizable main toolbar that, by default, includes a number of predefined items. You can remove any toolbar item you want using our API.

Nutrient is initialized with a default set of items that can be retrieved via MainToolbar.DefaultToolbarItems:

foreach(var item in MainToolbar.DefaultToolbarItems)
{
Debug.WriteLine(item.Name);
}

To remove any item, first find the item you want to remove from the current toolbar items listed in the main toolbar, MainToolbar.ToolbarItems. Then update MainToolbar.ToolbarItems to remove the item:

// Find the item to remove.
var inkToggleButton = PSPDFKitController.MainToolbar.ToolbarItems.First(
item => item.GetType() == typeof(InkToggleButton));
// Remove the item.
PSPDFKitController.MainToolbar.ToolbarItems.Remove(inkToggleButton);