Skip to content

Commit

Permalink
Raise hyperlink event for field links
Browse files Browse the repository at this point in the history
  • Loading branch information
dotMorten authored Jul 26, 2024
1 parent 2fc9789 commit b5e573c
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
using Esri.ArcGISRuntime.Data;
using Esri.ArcGISRuntime.Mapping.Popups;
using Esri.ArcGISRuntime.Toolkit.Internal;
#if MAUI
using Esri.ArcGISRuntime.Toolkit.Maui;
#else
using Esri.ArcGISRuntime.Toolkit.UI.Controls;
#endif

#if MAUI
using TextBlock = Microsoft.Maui.Controls.Label;
#else
Expand Down Expand Up @@ -134,7 +140,7 @@ private void RefreshTable()
gestureRecognizer.Tapped += (s, e) =>
{
if (uri is not null)
_ = Launcher.LaunchUriAsync(uri);
PopupViewer.GetPopupViewerParent(this)?.OnHyperlinkClicked(uri);
};
t.GestureRecognizers.Add(gestureRecognizer);
t.FormattedText = new FormattedString();
Expand All @@ -144,7 +150,7 @@ private void RefreshTable()
hl.Click += (s, e) =>
{
if (uri is not null)
_ = Launcher.LaunchUriAsync(uri);
PopupViewer.GetPopupViewerParent(this)?.OnHyperlinkClicked(uri);
};
hl.Inlines.Add("View");
t.Inlines.Add(hl);
Expand Down Expand Up @@ -234,4 +240,4 @@ public Style FieldTextStyle
PropertyHelper.CreateProperty<Style, FieldsPopupElementView>(nameof(FieldTextStyle));
}
}
#endif
#endif

0 comments on commit b5e573c

Please # to comment.