feat: focus dialog after showing modal

This commit is contained in:
rabbitism
2024-07-27 18:20:40 +08:00
parent 4a68c7ce9f
commit fb0816b2c5
3 changed files with 4 additions and 0 deletions

View File

@@ -20,6 +20,7 @@ public abstract class OverlayFeedbackElement: ContentControl
static OverlayFeedbackElement()
{
FocusableProperty.OverrideDefaultValue<OverlayFeedbackElement>(true);
DataContextProperty.Changed.AddClassHandler<OverlayFeedbackElement, object?>((o, e) => o.OnDataContextChange(e));
ClosedEvent.AddClassHandler<OverlayFeedbackElement>((o,e)=>o.OnClosed(e));
}