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. Image for the cookie policy date
close icon

Some questions about TabControlExt

Hello, I have some questions about TabControlExt :

- If I have two TabControlExt with drag&drop enabled, the user can drag&drop from one TabControlExt to the other. Is there a simple way to allow only reordering of Tabs within one TabControlExt ?

- TabControlExt contains an innerPanel named PART_ContentPanelInnerBorder. Is there a way to remove/hide it without replacing the whole control template?

- The drag&drop works by showing a marker, but the marker position is not stable: If I have tabs 1, 2 and 3, when moving tab 1 between 2 and 3, the maker position is different if I'm on the second half of tab 2 or on the first half of tab 3. Is there a way to correct that (maybe by having some constraints on the TabItem template?)

- I could not guess what was the effect of HotTrackingEnabled, even with tests, and, as is often the case, the documentation was no help to me, just stating that HotTrackingEnabled allowed me to know if HotTrackingEnabled was true... What is the purpose of this property?

Thank you!



3 Replies

DC David C Syncfusion Team September 21, 2010 01:30 PM UTC

Hi Loic,

We have addressed the first 3 questions in the DirectTrac incident 71394 as below.

"
Hi Loic,

1. Is there a simple way to allow only reordering of Tabs within a single TabControlExt ?.
Yes. We can allow the reordering of tabs only inside the single TabControlExt. We have done this requirement in the attached sample below. We used the DragEnter method in each of the TabControlExt to achieve this scenario. Now it will allow you to drop only within single TabControlExt. It is clearly explained in the sample.

2. The marker position is not stable:?
It is the default behavior in TabControlExt. Marker position depends upon the cursor placement in Drop target. We have attached the screen shot below to illustrate this.

3. I could not find the way to customize the context menu on a TabItem?.
We can customize the context menu on a tabitem by the property called ContextMenuItems. If we add the MenuItems to the ContextMenuItems collection, it will automatically add to the ContextMenu of TabItem. We explained with detail in the attached sample.

Sample :-

http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=TabControlExtSample-1001650508.zip

Screen shot:-

http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=ScreenShot-734263997.zip

Please let us know if you have any queries.

Regards,
David C


[Updated on 9/14/2010 9:28 AM by: loic.joly@reportive.com]


Hello, thank you for your assistance. Here are my remarks:

1- Thank you, it seems to do the job.

2- I'm not sure I expressed myself clearly enough about the stability problem. In an attempt to clarify, I have attached three pictures displaying what happens while I move the mouse over the tabs during a drag&drop (the screenshot were made with the sample in the dashboard):
- On picture 1, the marker is at some position
- On picture 2, when the mouse is exactly between tabs, the marker vanishes. I expected it to be still present, and at the same position.
- On picture 3, the marker is at a position slightly different from picture 1. I expected it to be at the same position.

In the ideal world, the 3 pictures should be exactly the same (except for the red comments, of course... ;)).

3- In your example, the menu items are added, but the default menu items are still present. I don't want to see any "Close" menu item in my menu (since in our application, the user will not be able to close the tabs), but I still need a context menu.

http://www.syncfusion.com/uploads/user/uploads/ScreenShot_4ea55021.zip

[Updated on 9/15/2010 3:40 AM by: David C ][Updated Type : Provide Defect Information ][Promised Date:9/20/2010 3:40 AM]-5days

Hi Loic,

Question 2 :-

After we have analyzed your screen shot we have found that issue exist with DragMarkerStyle when we have Default style in TabControlExt. We have logged an issue report for this issue and we would be updating you the fix within 3 business days.

Question 3 :-

We have an issue with the TabItem's context menu while we are taking the default context menu items into an account. As it always return null, we can't get the context menu items to disable this. We have logged an issue report for this issue and we would be updating you the fix within 3 business days.

Please let us know if you have any queries.

Regards,
David C
"

4. What is the use HotTrackingEnabled property?.
When HotTrackingEnabled is True, it will fetch the system color [ Depend upon the Operating System ] to be applied for the TabItems. This will be applicable only when user move the mouse over the item in Default.

Please let us know if you have any queries.

Regards,
David C



TO Tom November 28, 2019 04:04 PM UTC

The tabcontrol creates an inner border around the tabitem, as mentioned in this post, it is called PART_ContentPanelInnerBorder.  in the visual tree.
How do i set the style to hide this border?
thanks


KP Kanniyappan Panneer Selvam Syncfusion Team November 29, 2019 04:29 PM UTC

Hi Tom, 
 
Thanks for contacting Syncfusion support. 
 
We checked your query “Need to hide the inner border of  TabControlExt” and we can meet your requirement by setting the BorderThickness value as 0 in TabControlExtStyle1. Please find the code snippet, screenshot and sample for same. 
 
In XAML: 
                                     
<Border x:Name="PART_ContentPanelInnerBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0" Background="{TemplateBinding Background}" CornerRadius="2" Margin="3"> 
<ContentPresenter x:Name="PART_SelectedContentHost" AllowDrop="True" ContentTemplate="{TemplateBinding SelectedContentTemplate}" Content="{TemplateBinding SelectedContent}" ContentSource="SelectedContent" Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/> 
</Border> 
                                     
 
 
In C#: [Way 2] 
            private void TabControlExt_Loaded(object sender, RoutedEventArgs e) 
        { 
            Border innerBorder = tabControlExt.Template.FindName("PART_ContentPanelInnerBorder", tabControlExt) as Border; 
            if (innerBorder != null) 
                innerBorder.BorderThickness = new Thickness(0); 
        } 
 
 
Screenshot: 
 
 
 
Please let us know if you have any further assistance. 
 
Regards, 
Kanniyappan P. 
 


Loader.
Live Chat Icon For mobile
Up arrow icon