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

Binding to SelectedIndex Property

1 Answer 338 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
michael mccurrey
Top achievements
Rank 1
michael mccurrey asked on 12 Aug 2009, 10:02 PM
I can't seem to get TwoWay Binding to work with the TabControl SelectedIndex Property,  anybody else get this to work or is it just broken?
XAML Looks like this:
<Controls1:RadTabControl DockPanel.Dock="Top" SelectedIndex="{Binding Path=Header.SelectedTabIndex,Mode=TwoWay}" >
ViewModel Looks like this:
        public int SelectedTabIndex
        {
            get { return _selectedTabIndex; }
            set
            {
                if (_selectedTabIndex != value)
                {
                    _selectedTabIndex = value;
                    RaisePropertyChanged("SelectedTabIndex");
                }
            }
        }
Now, it gets updated if the user clicks a tab, but if its set in the ViewModel, TabControl does nothing...







Using 2009.2.701.35 build

1 Answer, 1 is accepted

Sort by
0
Bobi
Telerik team
answered on 13 Aug 2009, 03:23 PM
Hello michael mccurrey,

Please find attached a sample project that shows you how to bind SelectedIndex property.
You can also download the latest released assemblies from this week SP1 release where you can find some new fixes of Telerik controls.

I hope that this will help you.

Please let us know if you have any other questions or need some help.

Regards,
Boryana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
TabControl
Asked by
michael mccurrey
Top achievements
Rank 1
Answers by
Bobi
Telerik team
Share this question
or