Content
The Presentation library provides a declarative way to create content for tables, property grid and other content components based on iModel data.
Reference
There are 2 primary concepts for creating content: rules and specifications.
Rules
There are two types of content rules:
- Content rule is a container for specifications that produce content.
- Content modifier is a container for modifiers that are applied to all content produced by content rules and their specifications.
Both rules have picking attributes to specify what input the rule applies to.
Specifications
Content specifications define result of the rule if it does get used after evaluating it's condition and other picking attributes. There are 3 types of specifications:
- Selected node instances specification returns properties of the input instance.
- Content instances of specific classes specification returns properties of instances of given classes. The returned content doesn't depend on the input.
- Content related instances specification returns properties of instances that are related to input instances through given relationship(s).
Modifiers
Content modifiers allow modifying content by hiding or showing properties, including additional ones, or specifying custom renderers and editors. Available modifiers:
- Calculated properties specification allows creating a calculated property.
- Related properties specification allows including properties of related instances.
- Property category specification allows grouping properties under custom categories.
- Property overrides allow customizing display of specific properties - hiding them, changing label, category, renderer, editor.
Modifiers can be specified as part of content specifications or content modifiers.
External resources
- Retrieving properties in different ways
- Using element properties API to display properties in custom component
Last Updated: 18 May, 2022