Setting initial focus when using ToggleTransitionPresenter

WPF Studio, Themes, and Shared Library for WPF Forum

Posted 2 years ago by Jim Foye
Version: 22.1.4
Avatar

When my dialog opens, I'd like to set the focus on a particular button. But the usual approach of setting the attached property FocusManager.FocusedElement in XAML seems to have no effect. I tried just focusing the control in the window's Load event, but that didn't work, either. I assume there is some trick needed when using ToggleTransitionPresenter?

Comments (2)

Posted 2 years ago by Jim Foye
Avatar

Clarification: the button is of course in the markup inside ToggleTransitionPresenter.Content. It's visible when the dialog opens and I can tab to it.

Answer - Posted 2 years ago by Jim Foye
Avatar

Disregard, I had some code setting the focus from before I switched to using the ToggleTransitionPresenter.

The latest build of this product (v25.1.0) was released 27 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.