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