Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
830
Set focus to a control when displaying the Window
posted

How can I set the focus to an element when the dialog window is displayed?

Thanks,

Antxon

Parents
No Data
Reply
  • 17559
    posted

    Hello Antxon,

     

    I was looking into your question and I can suggest you handle the Loaded or LayoutUpdated event of the XamDialogWindow and in the handler to explicitly focus the element that you want(for example TextBox) with the following snippet:

    myTextBox.Focus();

     

    If this doesn’t suit your scenario, could you please provide me with some additional details about your case, so I can research this further.

Children