feat: add recall as internal function to overlay dialog.

This commit is contained in:
rabbitism
2024-03-09 18:52:26 +08:00
parent 04305234a1
commit 51d7c3c870
5 changed files with 30 additions and 3 deletions

View File

@@ -54,6 +54,13 @@ public class NumPad: TemplatedControl
private static void OnTargetGotFocus(object sender, GotFocusEventArgs e)
{
if (sender is not InputElement) return;
var existing = OverlayDialog.Recall<NumPad>(null);
if (existing is not null)
{
existing.Target = sender as InputElement;
return;
}
var numPad = new NumPad() { Target = sender as InputElement };
OverlayDialog.ShowCustom(numPad, new object());
}