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

Set Focus

1 Answer 57 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 1
Steve asked on 11 Oct 2011, 11:54 PM
I have a tab control defined as:

<telerik:RadTabControl  x:Name="MyTab" ItemsSource="{Binding Source={StaticResource APBViewModelViewSource}, Path=Model.Items}" SelectedItem="{Binding CurrentItem, Mode=TwoWay}"DisplayMemberPath="TabDisplayMemberPath" ContentTemplate="{StaticResource ContentTemplate}" Margin="10,10,0,0" />

I have a button that creates a new item in Items.  The CurrentItem is set correctly and the tab automatically changes to the new item. 

However, there is a specific textbox in the ContentTemplate that I want the focus to be defaulted to when the new item is created.  

I am using CSLA and am looking for an MVVM way to do this.  Any advice?

1 Answer, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 14 Oct 2011, 02:46 PM
Hi Steve,

 I am afraid this cannot be achieved since the focus is always set on the RadTabItem when a SelectionChange is performed and we cannot programmatically focus an element in the Content. We'll contact you if we find a way how this could be achieved.

Regards,
Petar Mladenov
the Telerik team

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

Tags
TabControl
Asked by
Steve
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Share this question
or