WPF visual studio like ToolBar "Add and remove buttons" menu - wpf

I'm trying to make a customized toolbar control like below:
The main window can have multiple toolbars, they are all created backgroundly.
What I need is make all the toolbars contains a "Add or Remove Buttons" menu.
It should work exactly like how visual studio does. You can show/hide items by checking the menu items under the "Add or Remove Button" menu.
Now the challenging part is how to make a "Add or Remove Button" control work exactly like visual studio. It seems wpf doesn't come with this kind of control....
When mouse hover the "Add or Remove button" the checkable menuitems should keep showing.

I cant see the link it appears to be broken for me but if you are talking about the little "down" arrow in VS that allows you to add new buttons then my first though is to use a context menu, which is available in wpf.

Related

How know if right click is on a "text being edited" not/before "text changed" event in winforms?

My question might be simple but I couldn't find specific answer on web.
I have a winforms application with a grid inside, in which I have implemented a context menu to be shown on right click on cells. These cells include text elements that can be edited. When user clicks or double clicks on the cell, the text can be edited and that's what I want. The problem is when the text is in edit mode and user right clicks on it again, 2 context menus are shown on each other. One is my context menu and the other is windows right click on text including options like copy, paste etc.
I wonder if there is any event like "text being edited" or "windows default context menu opened" that can be used for such scenarios? Or what is the proper way of solving this problem, which I guess must be a common one.
In these cases I want to show only the windows right-click menu, not mine.
Perhaps you need the Control.GotFocus event: https://msdn.microsoft.com/en-us/library/system.windows.forms.control.gotfocus%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396
You could look for focus, then prevent right clicks in the control until the control has lost focus (Control.LostFocus). If the control gets focus from a right click, then you could open your context menu (I think).

Create button in C# winform like IDM buttons

Did you see the first page of IDM (Internet Download Manager)??
IDM first form
Now i'm trying to build some buttons like these buttons(above picture) but I don't know how I must start? Is there any software for it? These buttons change their mode when hover mouse on them.
Have nice day
Start with a ToolStrip control and add a Button to it using the DropDown control on it. Change the DisplayStyle to ImageAndText, and TextImageRelation to ImageAboveText. Now change the Image property to your Icon image, and ImageScaling to None.
On the ToolStrip itself, change GripStyle to Hidden.

Adding plus button in WPF tab control after the last tab item?

I would like to achieve the "new tab" functionality of web browsers in WPF. In essence, I want to display a button after the last tab item which upon pressed creates a new tab.
I have no idea where to even begin. Should this button be part of the tab control or be out of it?
Okay, I found an answer, a duplicate: TabControl with Add New Tab Button (+)
some links are
http://www.codeproject.com/Articles/20860/An-Extended-WPF-TabControl
http://fabtab.codeplex.com/

Check button like in "solution explorer" in visual studio

there's "show all files" check button in solution explorer tab in visual studio. How can I make such a button ? /* give me a class */
My manager wants exactly the same button and it's behavior ..
Or is it not "free" button ?
Edit: I see some people didn't understand my question. Some explainations:
I need a check button exactly like in visual studio (like "show all files" button). I need a "check" bahavior when I clicked a button it shows some half-transparent blue layer on a button image. And I need a mouse hover behavior when a half-transparent blue layer added to a button image. I hope you understand my english
It is a button. Create a button, assign an image (if you want the pretty picture) and put an OnClick event handler in. In your event handler, you'll need to add the code to do what is required.
Solution Explorer provides you with an organized view of your projects and their files in treeview.You can do this
by implementing your own treeview and showing all the files and folders inside the root folder.
you can check this thread to get started with treeview
I need a check button exactly like in visual studio (like "show all files" button).
I'm assuming you need a button that looks like the button in VS, not a button that behaves like the button in VS.
It's a toolbar button. Add a Toolstrip to your form, add a button to the toolstrip, set the CheckOnClick property to true and add a custom image.

insert radiobox in menu in forms

How can I insert radiobutton in Menu as Menu item. I use WinForms and there I see only few option to insert other controls, but no radio :/
Also it's impossible to drag it from Controls and drop in menu in Design View :/
That's probably because an actual "radio button" control as a menu item would be weird, when you can already show a menu item as "checked" using the "radio button style". See the MenuItem.RadioCheck property.
If you really do want to do this, create an owner drawn menu. This is pretty straightforward. Here's a tutorial:
http://www.csharphelp.com/2006/08/ownerdraw-menu-items-in-c/
As for drawing the radiobuttons, use the static functions of the ControlPaint class.

Resources