WPF ToolBar: how to remove grip and overflow

后端 未结 6 2402
有刺的猬
有刺的猬 2020-12-07 14:29

In a nested WPF ToolBarPanel-ToolBar-Menu we want to get rid of the grip handle to the left and the overflow area to the right. they are both grayed out, but we\'d like them

6条回答
  •  情话喂你
    2020-12-07 15:09

    You can "remove" the overflow without supplying a new control template by setting the ToolBar to have negative right margins (and throw in a negative left margin so it doesn't look odd with rounded left edges but square right edges). Then, add ClipToBounds="True" to the ToolBarPanel which will cut off the edges of the toolbar which are now sticking outside the panel's area.

    
        
        . . .
    

提交回复
热议问题