Show / Hide Table of Contents

Event PopupAttachmentClicked

Raised when a popup attachment is clicked

Namespace: Esri.ArcGISRuntime.Toolkit.Maui
Assembly: Esri.ArcGISRuntime.Toolkit.Maui.dll
Syntax
public event EventHandler<PopupAttachmentClickedEventArgs>? PopupAttachmentClicked
Returns
Type Description
EventHandler<PopupAttachmentClickedEventArgs> Raised when a popup attachment is clicked
Remarks

By default, when an attachment is clicked, the default application for the file type (if any) is launched. To override this, listen to this event, set the Handled property to true and perform your own logic.

Example: Use the .NET MAUI share API for the attachment:
private async void PopupAttachmentClicked(object sender, PopupAttachmentClickedEventArgs e)
{
    e.Handled = true; // Prevent default launch action
    await Share.Default.RequestAsync(new ShareFileRequest(new ReadOnlyFile(e.Attachment.Filename!, e.Attachment.ContentType)));
}
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX