Skip to content

Commit f73d9af

Browse files
authored
Document that this API only works for UWP
1 parent 97ba361 commit f73d9af

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

windows.ui.xaml.input/focusmanager_getfocusedelement_1183614552.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ The object that has focus. Typically, this is a [Control](../windows.ui.xaml.con
2222

2323
## -remarks
2424

25+
> [!WARNING]
26+
> This will always return `null` in WinUI 3, since it relies on CoreWindow APIs that WinUI 3 doesn't support.
27+
>
28+
> Instead, prefer the [FocusManager.GetFocusedElement(XamlRoot)](./windows.ui.xaml.input.focusmanager.getfocusedelement#windows-ui-xaml-input-focusmanager-getfocusedelement(windows-ui-xaml-xamlroot))
29+
> overload; you can obtain the `XamlRoot` from any loaded UIElement via the [XamlRoot property](/uwp/api/windows.ui.xaml.uielement.xamlroot)
30+
2531
## -examples
2632

2733
## -see-also

0 commit comments

Comments
 (0)