mirror of
https://github.com/LorisYounger/VPet.git
synced 2024-08-30 18:42:36 +00:00
17 lines
388 B
C#
17 lines
388 B
C#
using System.Windows;
|
|
using System.Windows.Input;
|
|
|
|
namespace HKW.WPF.Extensions;
|
|
|
|
public static partial class WPFExtensions
|
|
{
|
|
/// <summary>
|
|
/// 清除元素焦点
|
|
/// </summary>
|
|
/// <param name="obj">元素</param>
|
|
public static void ClearFocus(this DependencyObject obj)
|
|
{
|
|
FocusManager.SetFocusedElement(FocusManager.GetFocusScope(obj), null);
|
|
}
|
|
}
|