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
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