如何删除 WPF 工具栏托盘上的下拉图标?

Edw*_*uay 1 c# wpf xaml toolbar

如何摆脱下面工具栏项中文本右侧的灰色下拉区域?

替代文本

这是生成它的代码:

ToolBar tb = new ToolBar();
tb.Background = new SolidColorBrush(Colors.Transparent);
Button button = new Button();
button.Content = "test";
button.Click += new RoutedEventHandler(button_Click);
tb.Items.Add(button);
value.ToolBars.Add(tb);
Run Code Online (Sandbox Code Playgroud)

Ejr*_*085 5

<ToolBar Height="120">
        <ToolBar.Style>
            <Style TargetType="ToolBar">
                <!-- Not Dropdown Button -->
                <Setter Property="ToolBarTray.IsLocked" Value="True"/>
                <!-- Not Overflow Button -->
                <Setter Property="OverflowMode" Value="Never"/>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type ToolBar}">
                            <ToolBarPanel IsItemsHost="True" Background="WhiteSmoke"/>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
        </ToolBar.Style>
        <!-- Content -->
        ........
        <!-- End Content -->
</ToolBar>
Run Code Online (Sandbox Code Playgroud)