Header TabItem on run time

2 posts, 0 answers
  1. ayala
    ayala avatar
    7 posts
    Member since:
    Feb 2009

    Posted 08 Mar 2009 Link to this post


    I want to define the header tab item on run time, how can I do it? 

    I tried to do this:

    TabItem

    newTab = new TabItem();

     

    newTab.Header = headerName; 

     

    tabControl.Items.Add(newTab);
    but it didn't work!

    what can I do?

    Thanks,

  2. Serrin
    Serrin avatar
    286 posts
    Member since:
    Sep 2008

    Posted 09 Mar 2009 Link to this post

    Hey ayala,

    Give this a try, it works for me in my application:

    RadTabItem rti = new RadTabItem();  
    rti.Header = "Report";  
    // make a stackpanel called newStack, fill it with stuff  
    rti.Content = newStack;  
    RadTabUno.Items.Add(rti);  
     

    Let me know if that works for you!

  3. DevCraft banner
Back to Top