Can't change TabItem in silverlight

2 posts, 0 answers
  1. Jerry
    Jerry avatar
    1 posts
    Member since:
    Jun 2010

    Posted 14 Dec 2010 Link to this post

     Now i'm using the TabControl in my project,I find a problem makes me very boring.
    When i dynamic create the TabControl,I set all of the created TabItem's IsSelected property as false,but always the first one also selected.It seems like that TabControl has a default value for selected.So how can i resolve it .This is my code.
     foreach (var sys_import in e.Result)
                    RadTabItem item = new RadTabItem() { Header = sys_import.PlugName,IsSelected=false};
    sys_improt is a collection,i set all the tab unselected as you see above,but
    the first RadTabItem always selected
    Thank you
  2. Tina Stancheva
    Tina Stancheva avatar
    3299 posts

    Posted 16 Dec 2010 Link to this post

    Hello Jerry,

    Can you try setting the RadTabControl SelectedIndex to -1 and let us know if it helps? Thank you in advance.

    Kind regards,
    Tina Stancheva
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for Silverlight
Back to Top