Skip to content

Allow collapsing overflow area of ToolBar #2723

Open
@krmr

Description

@krmr

Is your feature request related to a problem? Please describe.
A ToolBar always contains the area for the overflow, even there is no overflow at all. I am not sure if this is intended behavior or no. For small toolbars I find this rather annoying.

Here a small example, the overflow part is the lighter area to the right of the ‘B’ button:
grafik

In the package code itself I can get achieve my expected result by changing ToolBarOverflowButtonVisibilityConverter to return Visibility.Collapsed instead of Visibility.Hidden. But I guess that could cause issues in other use cases.

Describe the solution you'd like
The behavior of the overflow area is configurable in XAML.

Describe alternatives you've considered
My current workaround is to collapse the overflow grid using an implicit style:

<ToolBar.Resources>
    <Style TargetType="{x:Type Grid}">
        <Setter Property="Visibility" Value="Collapsed" />
    </Style>
</ToolBar.Resources>

This works only as long as there are no other uses of Grid.

Additional context
This is based on to 4.5.0.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions