How to set the initial focus for a form in Silverlight when using Caliburn.Micro
-
11-10-2019 - |
Pergunta
I have a form and want to set the initial focus to a text box. Is there a good way to do this with Silverlight and Caliburn.Micro? My first thought is to add an event that fires on page load and set the focus there. However, I suspect this will not be the way to do it because that would require finding the textbox. Is there a standard way to do this?
Solução
Caliburn.Micro doesn't specify any particular way to do this, but if you read this forum discussion http://caliburnmicro.codeplex.com/Thread/View.aspx?ThreadId=222892 you will get some insight. I think the FocusBehavior at the bottom may be what you are looking for.
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow