Skip to content

Commit 18c03ac

Browse files
authored
Update UIElement.xml (#9514)
1 parent be37f4d commit 18c03ac

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

xml/System.Windows/UIElement.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2038,9 +2038,7 @@ Image with an Elliptical Clip Region
20382038

20392039
If the related properties are not already `true`, when you call <xref:System.Windows.UIElement.Focus%2A>, one or more of the following events are raised in the following order: <xref:System.Windows.UIElement.PreviewLostKeyboardFocus>, <xref:System.Windows.UIElement.PreviewGotKeyboardFocus> (source is the new focus target), <xref:System.Windows.UIElement.IsKeyboardFocusedChanged>, <xref:System.Windows.UIElement.IsKeyboardFocusWithinChanged>, <xref:System.Windows.UIElement.LostKeyboardFocus>, <xref:System.Windows.UIElement.GotKeyboardFocus> (source is the new focus target).
20402040

2041-
In order for this call to be successful, some other element in the application needed to have focus previously.
2042-
2043-
2041+
For this call to be successful, some other element in the application needed to have focus previously. Also, when a parent container element calls this method, in certain situations the child gets the focus and the return value will be `false`. To test if the element has focus, use the `IsKeyboardFocusWithin` and `IsKeyboardFocused` properties.
20442042

20452043
## Examples
20462044
The following example sets focus to a <xref:System.Windows.Controls.TextBox> referenced by <xref:System.Windows.FrameworkElement.Name%2A>, and then adjusts the position of the cursor within the <xref:System.Windows.Controls.TextBox>.

0 commit comments

Comments
 (0)