{
// Loads a feature from the specified feature layer into an Inspector instance.
// create an instance of the inspector class
var inspector = new Inspector();
// load the feature with ObjectID 'objectId' into the inspector
await inspector.LoadAsync(featureLayer, objectId);
}
// Adds a custom validation rule to the "Mineral" field of the specified feature layer. await QueuedTask.Run(() => { var insp = new Inspector(); insp.LoadSchema(featureLayer); var attrib = insp.Where(a => a.FieldName == "Mineral").First(); attrib.AddValidate(() => { if (attrib.CurrentValue.ToString() == "Salt") return []; else return [ArcGIS.Desktop.Editing.Attributes.Attribute.ValidationError.Create("Error", Severity.Low)]; }); });
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)