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

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/

Related

Hide the close button on the context-sensitive menu? (XAF)

I want to remove the close button from the context-sensitive menu that appears when I right click a record in list view.
I found instructions how to do it for web forms but I am using Winforms.
I don't want to deactivate the controller because I still need the close button on the main toolbar.
I am wondering whether to move the barContainerClose from the barContainerView
In the template

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.

Text and Image in RadRibbonBar Right Panel Start Menu Telerik

How can I insert only text and image in RadRibbonBar Right Panel Start Menu? Or How Can I make a custom form to be shown in RadRibbonBar Right Panel Start Menu?
It seems currently I can only insert separator, menu item, button and some other limited controls which are clickable and I can not insert simple label and image.
On the left side of the backstage you can add two types of items:
- buttons, which trigger some action, such as Save, Exit, Open
- tab item, which show a content area on the right side
In the example above, Save & Send is a tab item. On its right side, you can see a RadPageView control with couple pages/tabs (Send using email, Save to web, etc). And each of these tabs, show some content (controls) - Save using email, shows some buttons and labels.
So to answer your question, if you place a tab item on the left, on the right side you can place any controls you like - buttons, labels, grids, charts, anything.

Dropdown menu overlaps other controls

In my WPF application I would like to get a dropdown menu under some other elements in the window. When menu is expanded it overlaps other controls. But I need these controls remain over the menu anytime.
I tried to play with ZIndex, but without any success.
Is it possible somehow to show dropdown menu under other controls?
Thanks for help!
You cannot achieve this with a drop-down menu, because by definition it is displayed on a separate window above the current window.
So if you want some control to appear under other controls, you have to use just normal controls like Grid, make them invisible at the beginning, and show as soon as you need the "dropdown" to appear (and of course hide afterwards).

Resources