Setting initial focus when using ToggleTransitionPresenter

WPF Studio, Themes, and Shared Library for WPF Forum

Posted 1 year 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 1 year 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 1 year 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 (v24.1.1) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.