mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 14:26:30 +00:00
fix keyboard catch, fix loading
refactoring
This commit is contained in:
@@ -1,20 +0,0 @@
|
||||
using System.Windows;
|
||||
using Azaion.Common.DTO;
|
||||
|
||||
namespace Azaion.Common.Extensions;
|
||||
|
||||
public static class WindowExtensions
|
||||
{
|
||||
public static WindowEnum GetParentWindow(this FrameworkElement? element)
|
||||
{
|
||||
while (element != null && element is not Window)
|
||||
{
|
||||
element = element.Parent as FrameworkElement;
|
||||
}
|
||||
|
||||
if (element is not Window)
|
||||
return WindowEnum.None;
|
||||
|
||||
return WindowEnum.Annotator;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user