Show / Hide Table of Contents

Class FeatureFormView

A visual feature editor form controlled by a FeatureForm definition.

Inheritance
Object
FeatureFormView
Namespace: Esri.ArcGISRuntime.Toolkit.Maui
Assembly: Esri.ArcGISRuntime.Toolkit.Maui.dll
Syntax
public class FeatureFormView : TemplatedView
Remarks

To use the camera to capture images for attachments, the corerct permissions must be set on your application.

Android:
Add the following to Android's AndroidManifest.xml:

<uses-permission android:name="android.permission.CAMERA" />
<queries>
    <intent>
        <action android:name="android.media.action.IMAGE_CAPTURE" />
    </intent>
</queries>

iOS:
Add the following to iOS's Info.plist:

<key>NSCameraUsageDescription</key>
<string>Adding attachments</string>

If these settings are not added, only file browsing will be enabled.

Constructors

| Improve this Doc View Source

FeatureFormView()

Initializes a new instance of the FeatureFormView class.

Declaration
public FeatureFormView()

Fields

| Improve this Doc View Source

FeatureFormContentScrollViewerName

Template name of the form's content's .

Declaration
public const string FeatureFormContentScrollViewerName = "FeatureFormContentScrollViewer"
Field Value
Type Description
String
| Improve this Doc View Source

FeatureFormProperty

Identifies the FeatureForm dependency property.

Declaration
public static readonly BindableProperty FeatureFormProperty
Field Value
Type Description
BindableProperty
| Improve this Doc View Source

ItemsViewName

Template name of the items layout view.

Declaration
public const string ItemsViewName = "ItemsView"
Field Value
Type Description
String
| Improve this Doc View Source

VerticalScrollBarVisibilityProperty

Identifies the VerticalScrollBarVisibility dependency property.

Declaration
public static readonly BindableProperty VerticalScrollBarVisibilityProperty
Field Value
Type Description
BindableProperty

Properties

| Improve this Doc View Source

FeatureForm

Gets or sets the associated FeatureForm which contains the form.

Declaration
public FeatureForm? FeatureForm { get; set; }
Property Value
Type Description
Nullable<FeatureForm>
| Improve this Doc View Source

IsValid

Gets a value indicating whether this form has any validation errors.

Declaration
public bool IsValid { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

VerticalScrollBarVisibility

Gets or sets the vertical scrollbar visibility of the scrollviewer below the title.

Declaration
public ScrollBarVisibility VerticalScrollBarVisibility { get; set; }
Property Value
Type Description
ScrollBarVisibility

Methods

| Improve this Doc View Source

DiscardEditsAsync()

Discards edits to all elements, refreshes any pending expressions and restores attachment list.

Declaration
public async Task DiscardEditsAsync()
Returns
Type Description
Task
| Improve this Doc View Source

FinishEditingAsync()

Saves edits made using the FeatureForm to the database.

Declaration
public async Task FinishEditingAsync()
Returns
Type Description
Task
| Improve this Doc View Source

OnApplyTemplate()

Declaration
protected override void OnApplyTemplate()

Events

| Improve this Doc View Source

BarcodeButtonClicked

Raised when the Barcode Icon in a barcode element is clicked.

Declaration
public event EventHandler<BarcodeButtonClickedEventArgs>? BarcodeButtonClicked
Event Type
Type Description
Nullable<EventHandler<BarcodeButtonClickedEventArgs>>
Remarks

Set the Handled property to true to prevent any default code and perform your own logic.

| Improve this Doc View Source

FormAttachmentClicked

Raised when a feature form attachment is clicked

Declaration
public event EventHandler<FormAttachmentClickedEventArgs>? FormAttachmentClicked
Event Type
Type Description
Nullable<EventHandler<FormAttachmentClickedEventArgs>>
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)));
}

See Also

MAUI: Media picker for photos and videos
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX