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.
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)));
}