From 789e346dd01d148ecd351d33c7622d7d77bce109 Mon Sep 17 00:00:00 2001 From: Prathamesh Narkhede <55591622+prathameshnarkhede@users.noreply.github.com> Date: Tue, 16 Jul 2024 13:59:31 -0700 Subject: [PATCH] Added support to override URL clicks in PopupViewer (#584) * Added support to override URL clicks in PopupViewer * Added samples for reference * Refactor PopupViewer and event handling * Refactor hyperlink event handling and cleanup - Corrected the event name from `HyperLinkClicked` to `HyperlinkClicked` in both XAML and code-behind files for consistency and to meet case sensitivity requirements. * Refactor GetPopupViewerParent to generic * Refactor GetParent generic constraint * Broaden type check in Tapped event handler * Refine type checks and adjust imports * Refactor PopupViewer parent traversal logic --- .../Samples/PopupViewerSample.xaml | 2 +- .../Samples/PopupViewerSample.xaml.cs | 13 +++-- .../PopupViewer/PopupViewerSample.xaml | 2 +- .../PopupViewer/PopupViewerSample.xaml.cs | 10 ++++ .../Controls/PopupViewer/PopupViewer.Maui.cs | 12 +++++ .../PopupViewer/PopupViewer.Windows.cs | 28 +++++++++++ .../UI/Controls/PopupViewer/PopupViewer.cs | 47 ++++++++++++++++++- .../PopupViewer/TextPopupElementView.Maui.cs | 5 +- .../TextPopupElementView.Windows.cs | 5 +- 9 files changed, 112 insertions(+), 12 deletions(-) diff --git a/src/Samples/Toolkit.SampleApp.Maui/Samples/PopupViewerSample.xaml b/src/Samples/Toolkit.SampleApp.Maui/Samples/PopupViewerSample.xaml index ef425da95..0257a6d20 100644 --- a/src/Samples/Toolkit.SampleApp.Maui/Samples/PopupViewerSample.xaml +++ b/src/Samples/Toolkit.SampleApp.Maui/Samples/PopupViewerSample.xaml @@ -12,7 +12,7 @@ - +