Files
DP44/enriched-partialglm/DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.ChartOptions/View.md
2026-04-17 14:55:32 -04:00

2.7 KiB

source_files, generated_at, model, schema_version, sha256
source_files generated_at model schema_version sha256
DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.ChartOptions/View/ChartOptionsView.xaml.cs
2026-04-16T11:18:57.795839+00:00 zai-org/GLM-5-FP8 1 2fdf05f68ae69d8d

Documentation: ChartOptionsView

1. Purpose

ChartOptionsView is a WPF view component implementing IChartOptionsView that provides user interface elements for configuring chart options. It serves as the visual layer for chart-related settings, specifically exposing available filter class options (CFC - likely "Channel Filter Classes" or "Calculated Filter Classes") to the UI for user selection.


2. Public Interface

ChartOptionsView() (Constructor)

Signature: public ChartOptionsView()

Initializes the view component by calling InitializeComponent(), which loads the associated XAML layout.

AvailableCFC (Property)

Signature: public List<IFilterClass> AvailableCFC { get; }

Returns: A List<IFilterClass> containing available filter class options.

Behavior: Creates a new instance of AnalogSettingDefaults on each access and returns its FilterOptions property. This property is read-only (getter only).


3. Invariants

  • The AvailableCFC property will never return null (assuming AnalogSettingDefaults.FilterOptions never returns null, which is not verifiable from this source alone).
  • The view always implements IChartOptionsView interface contract.
  • InitializeComponent() must be called exactly once during construction (handled by WPF framework conventions).

4. Dependencies

This module depends on:

  • DTS.Common.Interface - Provides IChartOptionsView interface
  • DTS.Common.Interface.Sensors.SoftwareFilters - Provides IFilterClass interface
  • DTS.SensorDB - Provides AnalogSettingDefaults class

What depends on this module:

  • Not determinable from this source file alone. Consumers would be whatever module creates or references ChartOptionsView instances.

5. Gotchas

  1. Object allocation on every property access: The AvailableCFC property instantiates a new AnalogSettingDefaults object every time it is read. If this property is data-bound in XAML and accessed frequently, it could create unnecessary object allocations and GC pressure. Consider whether this should be cached or lazy-loaded.

  2. FB 13120 reference: The comment references "FB 13120" which appears to be an issue/feature tracking identifier. The context or resolution of this tracking item is not available from the source.

  3. Unknown interface contract: The requirements of IChartOptionsView are not visible in this source, so it is unclear if AvailableCFC fulfills an interface member or is an additional public member.