I used to have a window with an attached property to track the focused control:
FocusManager.FocusedElement="{Binding CurrentlySelectedTextBox, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
CurrentlySelectedTextBox was a property in the window's viewmodel.
Now my window has a frame. The content of the frame is a page. I moved the original window's content to the page with its own viewmodel. I moved the attached property from the window to the page. Since then the CurrentlySelectedTextBox property is never set.
Long days of searching gave nothing. Are pages immune to FocusManager.FocusedElement?
Update: If the attached property is on the window, FocusManager.FocusedElement gets set even if the focus is on the page's control.
There's a concept of focusscope in wpf which can cause issues like this.
The basic problem is your page is a different focusscope to the window.
Focusscope allows wpf to maintain a logical rather than physical concept of focus for controls such as tabcontrol and menu.
In order to maintain which has logical focus the focusmanager will by default be concerned with the element which has focus within each focusscope.
The behaviour is somewhat configurable but you need to be very careful before altering this as there are side effects.