Files
DP44/docs/ai/DTS Viewer/DTS.Viewer/Classes.md

53 lines
2.8 KiB
Markdown
Raw Normal View History

2026-04-17 14:55:32 -04:00
---
source_files:
- DTS Viewer/DTS.Viewer/Classes/MenuItem.cs
- DTS Viewer/DTS.Viewer/Classes/TabItem.cs
- DTS Viewer/DTS.Viewer/Classes/NavigationItem.cs
- DTS Viewer/DTS.Viewer/Classes/BindingProxy.cs
- DTS Viewer/DTS.Viewer/Classes/ComplonentsGroupControl.cs
generated_at: "2026-04-17T16:11:25.310253+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "69a4590b22ea60d6"
---
# Classes
### Purpose
This module provides UI helper classes for the DTS Viewer WPF application. It includes a `BindingProxy` for enabling data binding in contexts where the data context is not directly accessible (e.g., within style setters), and a `ComponentsGroupControl` custom control for displaying grouped UI components with an image and title. Several placeholder classes (`MenuItem`, `TabItem`, `NavigationItem`) exist but contain no implementation.
### Public Interface
**BindingProxy** (inherits `Freezable`)
- `protected override Freezable CreateInstanceCore()` - Creates a new instance of `BindingProxy`. Required override for `Freezable` inheritance.
- `public static readonly DependencyProperty DataProperty` - Dependency property identifier for `Data`.
- `public object Data { get; set; }` - Gets or sets the data object to proxy for binding purposes.
**ComponentsGroupControl** (inherits `Control`)
- `public class ClickEventArgs : EventArgs` - Nested event args class with default constructor.
- `public static RoutedCommand ClickCommand { get; }` - Static routed command for click handling.
- `public static readonly DependencyProperty ImageProperty` - Dependency property identifier for `Image`.
- `public ImageSource Image { get; set; }` - Gets or sets the image source for the control.
- `public static readonly DependencyProperty TitleProperty` - Dependency property identifier for `Title`.
- `public string Title { get; set; }` - Gets or sets the title text; default value is "Title".
**MenuItem**
- No public members defined (empty class).
**TabItem**
- No public members defined (empty class).
**NavigationItem**
- No public members defined (empty class).
### Invariants
- `BindingProxy` must inherit from `Freezable` to participate in the WPF property system and support data binding in style setters.
- `ComponentsGroupControl` registers a default style key via `DefaultStyleKeyProperty.OverrideMetadata` in its static constructor, implying a XAML style/template must exist elsewhere.
- `ComponentsGroupControl.ClickCommand` is registered at the class level via `CommandManager.RegisterClassCommandBinding`.
### Dependencies
- **Depends on**: `System.Windows`, `System.Windows.Controls`, `System.Windows.Input`, `System.Windows.Media`.
- **Depended on by**: Unclear from source alone; likely used in DTS Viewer views and XAML templates.
### Gotchas
- **Commented-out code**: `ComponentsGroupControl` contains commented