We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

TabControlEx & creating new tabs

Thread ID:





89197 Aug 19,2009 05:50 PM UTC Nov 16,2009 03:56 PM UTC WPF 8
Tags: Tools
Asked On August 19, 2009 05:50 PM UTC


I'm new to SyncFusion, and I wanted to know if it was possible to give the user the possibility to create an extra tab at run time, by showing it a dummy tab (with a + sign), à la IE or FireFox.

I can't find this feature in the control, nor the way to add it easily (I would need to create this dummy tab myself, but this tab shoud be handled differently from other tabs, wrt drag&drop, for instance).

Best regards


C. Sudha [Syncfusion]
Replied On August 20, 2009 10:09 AM UTC


Your requirements could be easily achieved by writing template for TabItemExt.

The following code snippets demonstrate the same.


Background="{StaticResource background}"

MouseLeftButtonUp event for TabItemExt.


private void addTab_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
if (TabControlExt1 != null)
TabItemExt tab = new TabItemExt();
tab.Header = "New Tab";
tab.BorderBrush = Brushes.SkyBlue;
TabControlExt1.Items.Insert(TabControlExt1.Items.Count - 1, tab);
catch (Exception) { }

Please download the below sample for more reference.


Please let us know if you have any questions.

Thanks for your interest in Syncfusion products.


Replied On August 20, 2009 01:05 PM UTC

It looks like what I had in mind, and has the problem I was alluding to when talking about tab drag&drop. Please look at the attached screenshot of this example program, where the "+" pseudo-tab is no longer placed at the right position.


Replied On August 20, 2009 01:08 PM UTC

Another point is that this tab can be selected (not with the mouse, but by the ctrl-tab shortcut, or the tabs menu).

Best regards,


C. Sudha [Syncfusion]
Replied On August 22, 2009 10:21 AM UTC


Thanks for choosing Syncfusion products.

Your requirements could be achieved only by workaround while dragging and dropping of tabitem.

For Instance,

// Temporary varaible for storing dragged item
int draggedItemIndex = 0;
TabItemExt draggedItem = null;

private void TabControlExt1_DragEnd(object sender, TabControlExtDragEventArgs e)
// Store the dragged item before drop
draggedItem = TabControlExt1.SelectedItem as TabItemExt;
draggedItemIndex = TabControlExt1.Items.IndexOf(draggedItem);

private void TabControlExt1_Drop(object sender, DragEventArgs e)
int i = TabControlExt1.SelectedIndex;

// Check the dragged item is placed at the end of the Tab
if (i == TabControlExt1.Items.Count - 1)
// Remove that dragged item
// Placed the dragged item in original position itself.
TabControlExt1.Items.Insert(draggedItemIndex, draggedItem);
TabControlExt1.SelectedIndex = draggedItemIndex;

Your query regarding 'tab can be selected (not with the mouse, but by the ctrl-tab shortcut, or the tabs menu)' is
achieved by writing the trigger for selecting the tab.

Please download the modified sample from below mentioned location for more information. Hope this will resolve your problem.


Please let us know if you have any other queries.


Replied On August 24, 2009 07:49 AM UTC

I'd first like to thank you for your efforts in helping me. The current version of the example is better, and gives some ideas about how to reach my goal. It still has many glitches, for instance, the '+' tab can still be dragged, it appears in the tab menu... I think I can work around most of those.

One glitch for which I'm not sure I can find a workaround is the preview arrow. In your example, when doing drag&drop, the preview arrow still appears right of the '+' tab, even if the drop is not allowed here.

My need of this function is important, but not that urgent. Do you know if you have plans to natively support it in a future version of you product? I'd like to know if the best alternative for me is to go and fight all those glitches (maybe with your help at some point) or simply to wait for the next version.

Best regards,

C. Sudha [Syncfusion]
Replied On August 25, 2009 12:32 PM UTC


Thanks for choosing Syncfusion products.

By using the MouseMove and MouseLeave event of addtab, we can prevent the dragging of '+' tab. For instance,

In C#:

private void addTab_MouseMove(object sender, MouseEventArgs e)
TabControlExt1.AllowDragDrop = false;

private void addTab_MouseLeave(object sender, MouseEventArgs e)
TabControlExt1.AllowDragDrop = true;

Regarding your query about tab menu and preview arrow is more complicated by work around.

Yes. We have already filed a feature report about this when we started conversing and we have started to work on this feature. We will definitely include this in our Vol - 4 release. We will update you as soon as this feature gets implemented.

Thank you for your patience.

Please let us know if you have any questions.


Replied On November 13, 2009 01:48 PM UTC

I've just read vol4 documentation, but I haven't found anything related to this issue. Have I missed something?

Hemanth Kumar K [Syncfusion]
Replied On November 16, 2009 03:56 PM UTC


This Feature is Under implementation Status and it will be available within a week. Kindly Create new incident in our direct trac system . so that we will update you custom assemblies with this feature.

Please Let us Know if you have any queries,

HemanthKumar K


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon