WPF ToolBar: how to remove grip and overflow -


Nested WPF Toolbar - In the Toolbar menu we want to get rid of the hold for the left and overflow area right. Both of them are grayed out, but we do not want them to show everyone.

Any ideas on how to accomplish this?

Just completely correct in terms of my terms, if you see the picture in Figure 3 of the link given below, at the lower level of the three toolbars, hold the left side of the dropdown and the right-most The overflow is on the right side of the button.

The attached property can be caught by setting ToolBarTray. IsLocked = "True on Toolbar" .

In order to remove it, you have to remove it in a custom controlmetlet, as six alternative variables suggest, if you can be blended or downloaded, then Blend 3 preview is not high in quantity difficult.

You can also hide the button in the toolbar's loaded event, however, whatever route you take, you set the attached property ToolBar.OverflowMode = "never" A toolbar's menu, so that the item accidentally overflows in an accessible area.

  & lt; Toolbarpanel dockpanel.doc = "top" & gt; & Lt; Toolbar toolbar.islock = "true" loaded = "toolbar_loaded" & gt; & Lt; Menu Toolbar Overflomod = "never" & gt; & Lt; MenuItem header = "file" /> & Lt; MenuItem header = "new" /> & Lt; / Menu & gt; & Lt; / Toolbar & gt; & Lt; / ToolBarPanel & gt;  

Set the overflow toggle button to collapse:

  Private Zero ToolbarBloaded (Object Sender, RoutedEventArgs e) {ToolBar Toolbar = ToolBar Sender; Var overflow grid = toolbar Template.FindName ("overflugged", toolbar) as a framework element; If (overflow grid! = Null) {overflowGrid.Visibility = Visibility Collapsed; } WidworkElement as var mainPanelBorder = toolBar.Template.FindName ("MainPanelBorder", Toolbar); If (mainPanelBorder! = Null) {mainPanelBorder.Margin = New Thickness (); }}  

Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -