feat: update PopConfirm to support non-button triggers and rename Tap to Click

This commit is contained in:
Dong Bin
2025-04-18 17:59:07 +08:00
parent 67025dca9c
commit 5ba8789cf7
3 changed files with 10 additions and 2 deletions

View File

@@ -221,7 +221,7 @@ public class PopConfirm : ContentControl
private void SetupChildrenEventSubscriptions(Control? child, PopConfirmTriggerMode mode)
{
if (child is null) return;
if (mode == PopConfirmTriggerMode.Tap)
if (mode == PopConfirmTriggerMode.Click)
{
if (child is Button button)
Button.ClickEvent.AddHandler(OnMainButtonClicked, button);

View File

@@ -2,6 +2,6 @@ namespace Ursa.Controls;
public enum PopConfirmTriggerMode
{
Tap,
Click,
Focus,
}