Daniel,
Here's a sample that illustrates how to use the AddAttributeAsync method. It contains a single tool which displays a grid requesting attribute values from the user. After entering values into the grid, the user is required to sketch a rectangle to identify features. The attributes entered will then be applied to the features identified.
A couple of things to note.
The sample is written to work in conjunction with the 'Interacting With Maps.aprx' from the Community Samples Data. It works specifically with the Police Stations layer in that project.
In the sample I have added 2 attributes from a single layer into the inspector. However, there is no reason why you cannot have multiple attributes from multiple layers in the inspector at one time. It just depends on your purpose. As an example, Create Features only works with attributes from a single layer, whereas Tasks (in the GetAttributes action) allows attributes from multiple layers to be in the inspector grid at one time.
The sample also illustrates the validation of the attributes via the Attribute.AddValidate routine. This is how the red border outline appears. Obviously if no errors are returned, (or no Validation occurs) the attribute is deemed to be valid.
Let us know if you have any further questions or if you have trouble accessing this zip / sample. You may need to re-reference the ArcGIS dlls in the project according to your install location.
I will also get this posted to the Pro SDK Community Samples github repository.
Thanks
Narelle