20 lines
529 B
C#
20 lines
529 B
C#
using System.Windows;
|
|
|
|
namespace Livia.Utility
|
|
{
|
|
public class FocusVisualStyleClear
|
|
{
|
|
static FocusVisualStyleClear()
|
|
{
|
|
EventManager.RegisterClassHandler(typeof(FrameworkElement), UIElement.GotFocusEvent, new RoutedEventHandler(RemoveFocusVisualStyle), true);
|
|
}
|
|
|
|
public static void Init() { }
|
|
|
|
private static void RemoveFocusVisualStyle(object sender, RoutedEventArgs e)
|
|
{
|
|
((sender as FrameworkElement)!).FocusVisualStyle = null;
|
|
}
|
|
}
|
|
}
|