Customizing the dropdown navigation in our viewer toolbar

A dropdown group defines a common dropdown container for toolbar item buttons that share the same DropdownGroup property. When grouped together, all the toolbar items — except for the selected or default one — are hidden. However, they can be shown by opening the dropdown with the toggle arrow button.

Nutrient MAUI SDK includes some default dropdown groups for shapes, ink, and sidebar-related items.

You can create a new dropdown group or use predefined ones to group more than one ToolbarItem. This is done with the DropdownGroup property:

var customToolbarButton1 = new CustomMainToolbarButton("button 1")
{
    DropdownGroup = "my-group"
};
PSPDFKitController.MainToolbar.ToolbarItems.Add(customToolbarButton1);

var customToolbarButton2 = new CustomMainToolbarButton("button 2")
{
    DropdownGroup = "my-group"
};
PSPDFKitController.MainToolbar.ToolbarItems.Add(customToolbarButton2);

var customToolbarButton3 = new CustomMainToolbarButton("button 3")
{
    DropdownGroup = "my-group"
};
PSPDFKitController.MainToolbar.ToolbarItems.Add(customToolbarButton3);