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

Setting focus on a CoverFlow template item

6 Answers 91 Views
CoverFlow
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Darren Stoppler
Top achievements
Rank 1
Darren Stoppler asked on 12 Oct 2010, 11:45 PM
How would you set focus to a textbox that is present in a CoverFlow selected item?

Thank you.

6 Answers, 1 is accepted

Sort by
0
George
Telerik team
answered on 18 Oct 2010, 07:51 AM
Hello Darren,

I would suggest you to get the SelectedItem of the RadCoverFlow control. Then, you could find the textbox, placed in the item template using ChildrenOfType<TextBox>, and set the Focus on the textbox. 

I hope this helps.

Sincerely yours,
George
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Darren Stoppler
Top achievements
Rank 1
answered on 19 Oct 2010, 11:12 PM
Thanks George
0
Darren Stoppler
Top achievements
Rank 1
answered on 20 Oct 2010, 09:47 PM
Hi George,

I can only get reference to the coverflow data object rather than the template.  How would I access the actual item template through the selected item?

Thanks
0
George
Telerik team
answered on 26 Oct 2010, 11:36 AM
Hello Darren,

Sorry for this misunderstanding. Unfortunately, setting the focus to the TextBox is not as easy as I thought .

I would suggest you to add an Id (or Index) property of your ViewModel. Also, you could add an attached property to the textbox and bind it to the SelectedIndex of the RadCoverFlow. Then, you could check whether the Id is equal to the SelectedIndex or not, in order to set focus to the textbox.

Attached you can find the sample. I hope this helps. Please do not hesitate to contact us if you require any further information.

Sincerely yours,
George
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Darren Stoppler
Top achievements
Rank 1
answered on 04 Nov 2010, 11:03 AM
Thanks George
0
Pavan
Top achievements
Rank 1
answered on 20 Jan 2012, 06:16 AM
hi,

  Thanks very much for giving such excellenct example for rad cov er flow, i helped link from you is http://www.telerik.com/community/forums/silverlight/coverflow/setting-focus-on-a-coverflow-template-item.aspx
with this i can able to archive the task, but for setting the textbox focus the first cover page on load, i am facing problems . kindly help me with the code how to show focus for text box on load ok  the cover index. 

thanks in advanced 

Tags
CoverFlow
Asked by
Darren Stoppler
Top achievements
Rank 1
Answers by
George
Telerik team
Darren Stoppler
Top achievements
Rank 1
Pavan
Top achievements
Rank 1
Share this question
or