mirror of
https://github.com/LorisYounger/VPet.git
synced 2024-08-30 18:42:36 +00:00
22 lines
504 B
C#
22 lines
504 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
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);
|
|
}
|
|
}
|