Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > TabControl > Add new tab button like Chrome browser

Answered Add new tab button like Chrome browser

Feed from this thread
  • Inseok avatar

    Posted on Mar 26, 2011 (permalink)

    Hi, I'm trying to make a TabControl to contain "new tab button".
    You guys might know what I want to.

    Actually, there 'was' a simple solution:
    1. Edit TabControl's template.
    2. Modify inside of ScrollView "ScrollViewerElement" like:
    <ScrollViewer x:Name="ScrollViewerElement" ><!-- other attributes are omitted -->
        <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
            <ItemsPresenter/>
            <Button Content="+New" Click="Button_Click"/>
        </StackPanel>
    </ScrollViewer>

    It worked with Q3 2010 version of RatTabControl.
    But same code doesn't work with Q1 2011 version.

    The issue what I'm facing at, is the button( in the StackPanel inside the ScrollViewer) doesn't raise Click event at all.
    It's strange because the button still interact with MouseEnter and MouseLeft events so I can see the VisualTransition between the MouseOver State and the Normal State.
    It seems that the RadDockPanel(or something other) hooks any MouseLeftButtonDown and Handle it.
    Could you make sure why this happens?
    Here's a test project: http://cid-60778ca3c47c21fe.office.live.com/self.aspx/Public/AddNewTabTest.zip

    Oh, and I saw another solution which controls Items and ItemsSource of TabControl so that I can make sure the TabControl always contains the 'new tab button TAB'.
    It's possible, but I think it's too messy and it could be a cause of side-effect.

    Regards,
    Gongdo

    Reply

  • Answer Hristo Hristo admin's avatar

    Posted on Mar 28, 2011 (permalink)

    Hi Inseok,

    We made a major refactoring of the RadTabCotnrol. Unfortunately we introduce some new issues and bugs. However we are currently working on these issues and closing them one by one.

    The described scenario represents a bug in the tab control and we will fix it for our next internal build (in the beginning of the next week). I've updated your Telerik point +1000.

    Hope this helps. Let me know if you have further questions.

    Best wishes,
    Hristo
    the Telerik team

    Reply

  • Sajjad Shah avatar

    Posted on Jun 6, 2011 (permalink)

    Is this New tab (+) type style (like Google Chrome) availbale now in the latest release and working..? If not, Was this feaure availabe in previos release at all..?
     

    Reply

  • Sajjad Shah avatar

    Posted on Jun 6, 2011 (permalink)

    Is this New tab (+) type style (like Google Chrome) availbale now in the latest release and working..? If not, Was this feature availabe in previous release at all..?
     

    Reply

  • Inseok avatar

    Posted on Jun 6, 2011 (permalink)

    Currently(Q1 2011 SP1), It works fine. :)

    Reply

  • Petar Mladenov Petar Mladenov admin's avatar

    Posted on Jun 9, 2011 (permalink)

    Hello Inseok,

    @Sajjad Shah
    You can examine this demo and let us know if this is what you expect as a behavior. Feel free to ask if you need more info.

    Best wishes,
    Petar Mladenov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

    Reply

  • Sajjad Shah avatar

    Posted on Jun 9, 2011 (permalink)

    I have seen this one before. We want a dedicated tab item with a '+' symbol on it. Like chrome browser or IE.
    More preceisely: There is always a tab item appears at the end half visible and once you click on it, it turns into a complete tab item.

    Thanks.

    Reply

  • Petar Mladenov Petar Mladenov admin's avatar

    Posted on Jun 14, 2011 (permalink)

    Hello Sajjad Shah,

    We prepared a sample project for you that shows RadTabControl behaving like a web browser. Please check it out and let us know if it is a good starting point for you.

    Best wishes,
    Petar Mladenov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

    Reply

  • Sajjad Shah avatar

    Posted on Jun 14, 2011 (permalink)

    This zip file is not valid..?

    Reply

  • Petar Mladenov Petar Mladenov admin's avatar

    Posted on Jun 17, 2011 (permalink)

    Hello Sajjad Shah,

    We tried the zip file that we sent you and everything ran as expected. Running the 367268_TabControlSample.sln file works and the solution builds and runs fine. Could you elaborate more on the problems you have faced with the zip ?

    Greetings,
    Petar Mladenov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

    Reply

  • Sajjad Shah avatar

    Posted on Jun 24, 2011 (permalink)

    In the refence all the assemblies appear correctly but when I build I get this error message: The type or namespace name ViewModelBase could not be found ....

    Reply

  • Petar Mladenov Petar Mladenov admin's avatar

    Posted on Jun 29, 2011 (permalink)

    Hi Sajjad Shah,

    Could you please try to add the following line and let us know if it helped you?
    using Telerik.Windows.Controls;
    using System.Collections.ObjectModel;
    using System.Collections.Specialized;
     
    namespace _367268_TabControlSample
    {
        public class MainViewModel : ViewModelBase


    Kind regards,
    Petar Mladenov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

    Reply

  • Sajjad Shah avatar

    Posted on Jun 29, 2011 (permalink)

    It is already there. Still does not work.

    Reply

  • Petar Mladenov Petar Mladenov admin's avatar

    Posted on Jul 4, 2011 (permalink)

    Hello Sajjad Shah,


    I guess you are using an older version of the telerik dlls, I included the Q1 2011 SP1 dlls 0419. Please let us know if everything runs fine at your side now. Thank you in advance.

    Greetings,
    Petar Mladenov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

    Reply

  • Laurent avatar

    Posted on Nov 7, 2011 (permalink)

    It is possible to have this example in WPF, because I would wish to add a button Add Tab" too.

    Reply

  • Petar Mladenov Petar Mladenov admin's avatar

    Posted on Nov 10, 2011 (permalink)

    Hello Laurent,

     Please find a basic converted version of this approach for WPF in the attached project.

    Kind regards,
    Petar Mladenov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

    Attached files

    Reply

  • Dimitri Rakviashvili avatar

    Posted on Dec 12, 2011 (permalink)

    Hello Laurent, your aproach works fine, except 1 thing :

    when scrolling buttons in tab control are shown (try to add 10 tabs), "plus" button hides, so it is not possible to add new tab ....

    Using Q2 2011 ...

    Reply

  • Laurent avatar

    Posted on Dec 12, 2011 (permalink)

    Actually, I changed my approach and I put my button before the tabs.

    Reply

  • Chiara avatar

    Posted on Jan 26, 2012 (permalink)

    Hi Dimitri, 
    have you solved the problem whit the add button?

    Reply

  • Mark avatar

    Posted on Mar 7, 2012 (permalink)

    Just tried the WPF example. Beautiful. Thank you Petar.

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > TabControl > Add new tab button like Chrome browser
Related resources for "Add new tab button like Chrome browser"

Silverlight TabControl Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]