Skip to content

Working with Display Parameters#

By default, display parameters cannot be added to the display.

  • Decorate the View Model class with the [DisplayPluginSettings(ParametersMaxCount=n)] attribute to set an appropriate maximum number of display parameters allowed
    • 100 is the recommended maximum

Display parameters can be configured by

  • The user with the Parameter Browser
  • Programmatically via IDisplayParameterService

Each display parameter consists of a parameter container with a parameter per composite session.

Override the following DisplayPluginViewModel notifications as appropriate

  • OnParameterContainerAdded()
    • Called when parameter is first added.
  • OnParameterContainerRemoved()
    • Called when parameter is removed
  • OnParameterAdded()
    • Called for each composite session when a parameter is added
  • OnParameterRemoved()
    • Called for each composite session when a parameter is removed

Note

OnParameterContainerAdded will be called, followed by OnParameterAdded for each composite session

OnParameterRemoved is called for each composite session, followed by OnParameterContainerRemoved

Note

Use OnParameterAdded() and OnParameterRemoved() for compare set aware custom displays

Display Parameter Service#

The IDisplayParameterService is used to access and manipulate display parameters

  • ParameterContainers collection property
    • One per display parameter
    • Parameters collection property
      • One per composite session
  • PrimaryParameters collection property
    • One per display parameter
    • Parameters from the primary composite session only
  • AddParameterContainer()
    • Programmatically add a display parameter (usually done in OnInitialised())
  • RemoveParameterContainer()
    • Programmatically remove a display parameter