'DING' On TabStop in C#/WPF -


i have wpf window numerous textboxes/buttons. when trying use tab key navigate between objects hear 'ding' , focus not changed next object in tabindex.

here window have looks tabindex numbers displayed.

example image

all objects have tabstop set true.

not prettiest solution works.

on form initialization call

this.keyup += new system.windows.forms.keyeventhandler(keyevent);

then utilize function grab tab key , process focus.

private void keyevent(object sender, keyeventargs e) //keyup event      {         if (e.keycode == keys.tab)         {             ++ifocuscount;         }         else if (e.keycode == keys.tab && e.keycode == keys.shift)         {             --ifocuscount;         }         switch (ifocuscount)         {             case 0:                 contactbox.focus();                 break;              case 1:                 incidentbox.focus();                 break;             case 2:                 actionslistbox.focus();                 break;             case 3:                 profileslistbox.focus();                 break;             case 4:                 currentlatchbox.focus();                 break;             case 5:                 daysbox.focus();                 break;             case 6:                 calculatedatebutton.focus();                 break;             case 7:                 copybutton.focus();                 break;             case 8:                 notestextbox.focus();                 break;             case 9:                 keycodebox.focus();                 break;             case 10:                 xnabox.focus();                 break;             case 11:                 generatetambutton.focus();                 break;             case 12:                 generatenotesbutton.focus();                 break;             case 13:                 sendemailbutton.focus();                 break;             case 14:                 savebutton.focus();                 break;             case 15:                 clearlabel.focus();                 break;             case 16:                 ifocuscount = 0;                 contactbox.focus();                 break;         }      } 

this still produces "ding" focus changes wanted in first place.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -