This is a migrated thread and some comments may be shown as answers.

Can't change TabItem in silverlight

1 Answer 34 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
Jerry
Top achievements
Rank 1
Jerry asked on 14 Dec 2010, 07:18 PM
Hello
 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};
                tab.Items.Add(item);
               }
sys_improt is a collection,i set all the tab unselected as you see above,but
the first RadTabItem always selected
Thank you

1 Answer, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 16 Dec 2010, 04:22 PM
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
Tags
TabControl
Asked by
Jerry
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Share this question
or