silverlight - Silvelright -set tabindex of UIElements in MVVM -


i trying set tab index of 2 uielements within user control. user control contains text box , button. have focus being applied textbox via attached property have ability press tab key , navigate textblock button or detect key press (enter key) , trigger command on button(i know separate question)

the main focus accomplishing tab index first.

thanks pointers or suggestions.

update

i've since tried employ attached property handle tabbing order

        public static dependencyproperty tabindexproperty = dependencyproperty.registerattached("tabindex", typeof(int), typeof(attachedproperties), null);     public static void settabindex(uielement element, int value)     {         control c = element control;         if (c != null)         {              routedeventhandler loadedeventhandler = null;             loadedeventhandler = new routedeventhandler(delegate                 {                     htmlpage.plugin.focus();                     c.loaded -= loadedeventhandler;                     c.focus();                 });             c.loaded += loadedeventhandler;         }     }  

however when attempt compile receive errors tabindex property not exist button control. ideas why failing?

this view specific concern and, such, in mvvm should handled @ viewlevel. mvvm doesn't stipulate remove code code behind. means should have view specific concern when put code there. 1 of cases, imo.


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -