Show / Hide Table of Contents

Event FormAttachmentClicked

Raised when a feature form attachment is clicked

Namespace: Esri.ArcGISRuntime.Toolkit.Maui
Assembly: Esri.ArcGISRuntime.Toolkit.Maui.dll
Syntax
public event EventHandler<FormAttachmentClickedEventArgs>? FormAttachmentClicked
Returns
Type Description
EventHandler<FormAttachmentClickedEventArgs> Raised when a feature form 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 FormAttachmentClicked(object sender, FormAttachmentClickedEventArgs e)
{
    e.Handled = true; // Prevent default launch action
    await Share.Default.RequestAsync(new ShareFileRequest(new ReadOnlyFile(e.FilePath!, e.ContentType)));
}
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX