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

SelectedItem is not set

4 Answers 69 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
Richard Koslik
Top achievements
Rank 1
Richard Koslik asked on 10 May 2012, 07:20 AM
Hello,

I have bound the SelectedItem Property of a TabControl, but when I start my application the property has always the value NULL until I first click onto a Tabsheet. IsDefaultItemSelected = True has also no effect.

Is use:
- Silverlight 5
- RadControlsVersion Q1 2012 SP1 (Runtime version v4.0.30319)
- GalaSoft MVVM

<telerik:RadTabControl IsDefaultItemSelected="True" TabStripPlacement="Left" BorderBrush="DarkGray" BorderThickness="1" TabOrientation="Vertical" Align="Right"  ScrollViewer.VerticalScrollBarVisibility="Auto"  VerticalAlignment="Top" Height="310" HorizontalAlignment="Left" Margin="5,581,0,0" Name="tcChild" Width="1639" 
                                 SelectedItem="{Binding tabItemChild, Mode=TwoWay}" SelectedIndex="{Binding iTabIndexChild, Mode=TwoWay}">

What do I wrong??


best regards
Richard Koslik

4 Answers, 1 is accepted

Sort by
0
Accepted
Tina Stancheva
Telerik team
answered on 14 May 2012, 06:45 PM
Hello Richard,

I wasn't able to reproduce the issue. Can you please have a look at the attached sample and let me know if I'm missing something? Thank you in advance.

Kind regards,
Tina Stancheva
the Telerik team

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

0
Richard Koslik
Top achievements
Rank 1
answered on 15 May 2012, 08:36 AM
Hello,

thanks for your help. Your sample works fine, but my situation is another one.

My tabsheets are created directly in the xaml. I changed your sample to my situation maybe you are able to find the problem, in the older Silverlight Controls version my solution worked fine.

i will send you the .zip - file through a new support ticket.

best regards, Richard Koslik
0
Petar Mladenov
Telerik team
answered on 16 May 2012, 07:51 AM
Hi Richard  ,

 We replied in your support thread. The problem's origin is the mix between ViewModels and static Radtabitems which is not supported.

Greetings,
Petar Mladenov
the Telerik team

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

0
Richard Koslik
Top achievements
Rank 1
answered on 16 May 2012, 09:54 AM
Hello,

thanks for your support, I changed now my project, create the tabitems manually and it works.

 best regard,
Richard Koslik
Tags
TabControl
Asked by
Richard Koslik
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Richard Koslik
Top achievements
Rank 1
Petar Mladenov
Telerik team
Share this question
or