Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Windows XAML WPF ListBox
Hi, I have a listbox and it has a datasource, according to datasource some Textboxes are created automatically and when I MouseEnter to the first TextBox which is in Listbox's DataTemplate Keyboard disapers and the think that I want to do is When I click on a letter from the keyboard I want to go in to the next TextBox. For example; I click to "A" letter for the first Textbox and than I want to go into the next Texbox How can ı do that ??
Posted 27-Mar-13 14:09pm
ct_12412
Comments
AghaKhan at 27-Mar-13 19:19pm
   
Who told you that Textboxes are created automatically. That is a wrong information. You don't see it because there is none.
ct_12 at 27-Mar-13 20:15pm
   
You sure that you have understood the question? I am not asking that textbox are created automatically or not ! Read it again and if u have a solution just write it.
ThePhantomUpvoter at 27-Mar-13 20:25pm
   
What I think you want to do from this is create a TraversalRequest object with FocusNavigationDirection.Next then get the UIElement that has the focus then call MoveFocus.
ct_12 at 28-Mar-13 5:51am
   
Thank you for your answer but I can not find any .dll to import it to the project in Visual Studio for WindowsPhone, you have any idea about it ?
AghaKhan at 27-Mar-13 21:24pm
   
I can write a solution with no problem, but have to understand the question. It is not clear I click "A" letter for the first Textbox and then I want to go to int next TextBox.
 
It looks like you have listbox and every listboxitem has a TextBox. How many ListboxItem do you have? Is each textBox take only one char as a input? I am not sure what is your question. Please make it clear and I will post the solution! Thanks for asking.
Sergey Alexandrovich Kryukov at 27-Mar-13 23:37pm
   
Exactly. And OP is pretty rude...
—SA
ct_12 at 28-Mar-13 3:23am
   
That is why I said tectbox created according to the datasource I mean it depends on the num of element that come from listbox's Itemsource, but assume there are 7 textboxes in listbox, each textbox takes one character as input and whe it takes a character i want program to do is just go in to the next textbox, thank you for your answer
AghaKhan at 28-Mar-13 8:08am
   
It is 5 AM and I just saw your reply. Today I will write a solution for you. Having said that it is very easy to fix. When text box Textchanged its value (One char) (override TextChanged something like this) put focus to next(Lisbox.SelectedIndex)item. Now your next char will be on next TextBox. I hope it will help. Try that if it does not work just let me know. Thank you for asking.
ct_12 at 28-Mar-13 14:22pm
   
Sorry but I could not understand what you mean, you mean override the textbox textchanged method ? what am I supposed to write in the textchanged method ?
ct_12 at 28-Mar-13 17:37pm
   
I have sent you an e-mail about my address, thanks a lot again.
AghaKhan at 29-Mar-13 1:22am
   
I created a phone app and it works for me.
ct_12 at 29-Mar-13 14:49pm
   
Man you'r the best ! seriously you cant even imagine that how much you helped me on that project, thank a lot again and again, best regards.
H.Brydon at 29-Mar-13 22:19pm
   
You should edit this message and remove your email address. Spammers will find it and use it.
AghaKhan at 30-Mar-13 0:01am
   
Thank you

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

AghaKhan gave the best answer.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 304
1 Maciej Los 285
2 Sergey Alexandrovich Kryukov 230
3 Shweta N Mishra 186
4 Aajmot Sk 153
0 OriginalGriff 7,660
1 Sergey Alexandrovich Kryukov 7,072
2 DamithSL 5,604
3 Manas Bhardwaj 4,986
4 Maciej Los 4,760


Advertise | Privacy | Mobile
Web04 | 2.8.1411023.1 | Last Updated 29 Mar 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100