1. Getting started
  2. Annotations
  3. Dynamic resources
  4. Validation
  5. Form Elements
  6. Actions
  7. Environments
  8. XML Forms

Form Elements

Besides input fields, which are declared through regular properties, additional form content can be added by using annotations.

Text elements

There are three types of text elements: Title, Heading, and Text.

Font sizes are controlled by the following attached properties:

These properties are inheritable in the XAML tree. As such, you can customize these values in the hosting DynamicForm or any of its parents.

Actions

Actions render as buttons. They are added through the [Action] attribute. Actions are discussed separately in the next page.

Other elements

Element placement

You can only decorate a property by specifying the attribute above it. You can customize this behavior by setting Placement property, which can have one of these values:

If you add attributes at class level, the content is either placed before or after the form, depending on Placement value.

ShareLine property indicates whether the element accepts following elements to be inlined in the same row. LinePosition is another property that specifies the element’s horizontal alignment in its row. Possible values are LinePosition.Left and LinePosition.Right.

Custom elements

You can create your own content by subclassing FormContentAttribute, and providing an implementation to FormElement CreateElement(), where you must return an implementation of FormElement.

After this step is done, you can attach the attribute to your form/fields like you would any of the above.

Back to top