This commit is contained in:
2026-04-17 14:55:32 -04:00
commit bc3ac1d4c9
18017 changed files with 4371742 additions and 0 deletions

View File

@@ -0,0 +1,295 @@
---
source_files:
- Common/DTS.Common/RibbonControl/Classes/ButtonData.cs
- Common/DTS.Common/RibbonControl/Classes/SeparatorData.cs
- Common/DTS.Common/RibbonControl/Classes/GalleryItemData.cs
- Common/DTS.Common/RibbonControl/Classes/ComboBoxData.cs
- Common/DTS.Common/RibbonControl/Classes/MenuItemData.cs
- Common/DTS.Common/RibbonControl/Classes/SplitMenuItemData.cs
- Common/DTS.Common/RibbonControl/Classes/ApplicationMenuItemData.cs
- Common/DTS.Common/RibbonControl/Classes/ApplicationSplitMenuItemData.cs
- Common/DTS.Common/RibbonControl/Classes/TextBoxData.cs
- Common/DTS.Common/RibbonControl/Classes/CheckBoxData.cs
- Common/DTS.Common/RibbonControl/Classes/RadioButtonData.cs
- Common/DTS.Common/RibbonControl/Classes/ToggleButtonData.cs
- Common/DTS.Common/RibbonControl/Classes/SplitButtonData.cs
- Common/DTS.Common/RibbonControl/Classes/ContextualTabGroupData.cs
- Common/DTS.Common/RibbonControl/Classes/ViewModel.cs
- Common/DTS.Common/RibbonControl/Classes/GalleryCategoryData.cs
- Common/DTS.Common/RibbonControl/Classes/TabData.cs
- Common/DTS.Common/RibbonControl/Classes/RibbonData.cs
- Common/DTS.Common/RibbonControl/Classes/GalleryData.cs
- Common/DTS.Common/RibbonControl/Classes/ControlData.cs
- Common/DTS.Common/RibbonControl/Classes/MenuButtonData.cs
- Common/DTS.Common/RibbonControl/Classes/GroupData.cs
generated_at: "2026-04-17T15:27:54.402997+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "8a6fd67205065095"
---
# DTS.Common.RibbonControl Classes Documentation
## 1. Purpose
This module provides a data model layer for a WPF Ribbon control implementation. It defines a class hierarchy representing ribbon UI elements—tabs, groups, buttons, menus, galleries, and various input controls—with full `INotifyPropertyChanged` support for WPF data binding. The classes serve as ViewModels or data transfer objects that abstract ribbon control state, enabling separation between UI definition and rendering.
---
## 2. Public Interface
### ControlData
**Base class for all ribbon control elements.** Implements `INotifyPropertyChanged`.
| Property | Type | Description |
|----------|------|-------------|
| `Label` | `string` | Display label for the control. |
| `LargeImage` | `Uri` | URI for 32x32 icon. |
| `SmallImage` | `Uri` | URI for 16x16 icon. |
| `ToolTipTitle` | `string` | Tooltip header text. |
| `ToolTipDescription` | `string` | Tooltip body text. |
| `ToolTipImage` | `Uri` | Tooltip image URI. |
| `ToolTipFooterTitle` | `string` | Tooltip footer header. |
| `ToolTipFooterDescription` | `string` | Tooltip footer body. |
| `ToolTipFooterImage` | `Uri` | Tooltip footer image URI. |
| `Command` | `ICommand` | Command executed on control activation. |
| `KeyTip` | `string` | Keyboard shortcut hint. |
| Event | Description |
|-------|-------------|
| `PropertyChanged` | Raised when any property value changes. |
---
### ButtonData
**Simple button control data.** Extends `ControlData` with no additional members.
---
### SeparatorData
**Visual separator in menus/toolbars.** Extends `ControlData` with no additional members.
---
### GalleryItemData
**Individual item within a gallery.** Extends `ControlData` with no additional members.
---
### TextBoxData
**Text input control data.** Extends `ControlData`.
| Property | Type | Description |
|----------|------|-------------|
| `Text` | `string` | Current text value. Raises `PropertyChanged("Text")` on change. |
---
### CheckBoxData
**Checkbox control data.** Extends `ControlData`.
| Property | Type | Description |
|----------|------|-------------|
| `IsChecked` | `bool` | Checked state. Raises `PropertyChanged("IsChecked")` on change. |
---
### RadioButtonData
**Radio button control data.** Extends `ControlData`.
| Property | Type | Description |
|----------|------|-------------|
| `IsChecked` | `bool` | Selected state. Raises `PropertyChanged("IsChecked")` on change. |
---
### ToggleButtonData
**Toggle button control data.** Extends `ControlData`.
| Property | Type | Description |
|----------|------|-------------|
| `IsChecked` | `bool` | Toggled state. Raises `PropertyChanged("IsChecked")` on change. |
---
### MenuButtonData
**Dropdown menu button data.** Extends `ControlData`.
| Constructor | Description |
|-------------|-------------|
| `MenuButtonData()` | Creates instance with `isApplicationMenu = false`. |
| `MenuButtonData(bool isApplicationMenu)` | Creates instance with specified application menu flag. |
| Property | Type | Description |
|----------|------|-------------|
| `IsVerticallyResizable` | `bool` | Vertical resize capability. |
| `IsHorizontallyResizable` | `bool` | Horizontal resize capability. |
| `ControlDataCollection` | `ObservableCollection<ControlData>` | Child controls (lazily initialized). |
---
### SplitButtonData
**Split button with dropdown.** Extends `MenuButtonData`.
| Constructor | Description |
|-------------|-------------|
| `SplitButtonData()` | Creates instance with `isApplicationMenu = false`. |
| `SplitButtonData(bool isApplicationMenu)` | Creates instance with specified application menu flag. |
| Property | Type | Description |
|----------|------|-------------|
| `IsChecked` | `bool` | Checked state for checkable split buttons. |
| `IsCheckable` | `bool` | Whether the button can be checked. |
| `DropDownButtonData` | `ButtonData` | Lazily-initialized dropdown button data. |
---
### MenuItemData
**Menu item data.** Extends `SplitButtonData`.
| Constructor | Description |
|-------------|-------------|
| `MenuItemData()` | Creates instance with `isApplicationMenu = false`. |
| `MenuItemData(bool isApplicationMenu)` | Creates instance with specified application menu flag. |
---
### SplitMenuItemData
**Split menu item data.** Extends `MenuItemData`.
| Constructor | Description |
|-------------|-------------|
| `SplitMenuItemData()` | Creates instance with `isApplicationMenu = false`. |
| `SplitMenuItemData(bool isApplicationMenu)` | Creates instance with specified application menu flag. |
---
### ApplicationMenuItemData
**Application menu item data.** Extends `MenuItemData`.
| Constructor | Description |
|-------------|-------------|
| `ApplicationMenuItemData()` | Creates instance with `isApplicationMenu = false`. |
| `ApplicationMenuItemData(bool isApplicationMenu)` | Creates instance with specified application menu flag. |
---
### ApplicationSplitMenuItemData
**Application split menu item data.** Extends `SplitMenuItemData`.
| Constructor | Description |
|-------------|-------------|
| `ApplicationSplitMenuItemData()` | Creates instance with `isApplicationMenu = false`. |
| `ApplicationSplitMenuItemData(bool isApplicationMenu)` | Creates instance with specified application menu flag. |
---
### ComboBoxData
**Combo box control data.** Extends `MenuButtonData` with no additional members.
---
### GalleryCategoryData
**Category container within a gallery.** Extends `ControlData`.
| Property | Type | Description |
|----------|------|-------------|
| `GalleryItemDataCollection` | `ObservableCollection<GalleryItemData>` | Items in this category (lazily initialized). |
---
### GalleryCategoryData\<T\>
**Generic category container.** Extends `ControlData`.
| Property | Type | Description |
|----------|------|-------------|
| `GalleryItemDataCollection` | `ObservableCollection<T>` | Generic items collection (lazily initialized). |
---
### GalleryData
**Gallery control data.** Extends `ControlData`.
| Property | Type | Description |
|----------|------|-------------|
| `CategoryDataCollection` | `ObservableCollection<GalleryCategoryData>` | Categories in this gallery (lazily initialized). |
| `SelectedItem` | `GalleryItemData` | Currently selected gallery item. |
| `CanUserFilter` | `bool` | Whether user can filter gallery items. |
---
### GalleryData\<T\>
**Generic gallery control data.** Extends `ControlData`.
| Property | Type | Description |
|----------|------|-------------|
| `CategoryDataCollection` | `ObservableCollection<GalleryCategoryData<T>>` | Generic categories (lazily initialized). |
| `SelectedItem` | `T` | Currently selected item. |
| `CanUserFilter` | `bool` | Whether user can filter gallery items. |
---
### TabData
**Ribbon tab data.** Implements `INotifyPropertyChanged` directly.
| Constructor | Description |
|-------------|-------------|
| `TabData()` | Creates instance with null header. |
| `TabData(string header)` | Creates instance with specified header. |
| Property | Type | Description |
|----------|------|-------------|
| `Header` | `string` | Tab header text. |
| `ContextualTabGroupHeader` | `string` | Header of associated contextual tab group. |
| `IsSelected` | `bool` | Whether tab is currently selected. |
| `GroupDataCollection` | `ObservableCollection<GroupData>` | Groups in this tab (lazily initialized). |
---
### ContextualTabGroupData
**Contextual tab group data.** Implements `INotifyPropertyChanged` directly.
| Constructor | Description |
|-------------|-------------|
| `ContextualTabGroupData()` | Creates instance with null header. |
| `ContextualTabGroupData(string header)` | Creates instance with specified header. |
| Property | Type | Description |
|----------|------|-------------|
| `Header` | `string` | Group header text. |
| `IsVisible` | `bool` | Whether the group is visible. |
| `TabDataCollection` | `ObservableCollection<TabData>` | Tabs in this group (lazily initialized). |
---
### GroupData
**Ribbon group data.** Extends `ControlData`.
| Constructor | Description |
|-------------|-------------|
| `GroupData(string header)` | Creates instance; sets `Label` to header. |
| Property | Type | Description |
|----------|------|-------------|
| `ControlDataCollection` | `ObservableCollection<ControlData>` | Controls in this group (lazily initialized). |
---
### RibbonData
**Root ribbon data container.** Implements `INotifyPropertyChanged` directly.
| Property | Type | Description |
|----------|------|-------------|
| `TabDataCollection` | `ObservableCollection<TabData>` | All tabs (lazily initialized). |
| `ContextualTabGroupDataCollection` | `ObservableCollection<ContextualTabGroupData>` | Contextual tab groups (lazily initialized). |
| `ApplicationMenuData` | `MenuButtonData` | Application menu data (lazily initialized). |
---
### ViewModelData
**Static class providing default ribbon configuration.**
| Constant | Type | Value | Description |
|----------|------|-------|-------------|
| `TabCount` | `int` | 4 | Number of tabs to generate. |
| `ContextualTabGroupCount` | `int` | 2 |

View File

@@ -0,0 +1,70 @@
---
source_files:
- Common/DTS.Common/RibbonControl/Interface/IRibbonView.cs
- Common/DTS.Common/RibbonControl/Interface/IRibbonTabInfoProvider.cs
- Common/DTS.Common/RibbonControl/Interface/IRibbonViewModel.cs
generated_at: "2026-04-17T16:35:56.547091+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "1f9b8fbe5cb13bc2"
---
# Ribbon Control Interface Documentation
## 1. Purpose
This module defines the core interfaces for the ribbon control system within the DTS application framework. It establishes the contract for ribbon views, view models, and tab identification mechanisms. These interfaces serve as an abstraction layer that decouples the ribbon UI components from their concrete implementations, enabling consistent interaction patterns across the system's ribbon-based navigation and command surfaces.
---
## 2. Public Interface
### `IRibbonView`
**Location:** `DTS.Common.RibbonControl` namespace
**Signature:**
```csharp
public interface IRibbonView : IBaseView { }
```
**Behavior:** A marker interface that extends `IBaseView`. It defines no additional members beyond its base interface, serving as a type identifier for ribbon-specific view implementations.
---
### `IRibbonTabInfoProvider`
**Location:** `DTS.Common.RibbonControl` namespace
**Signature:**
```csharp
public interface IRibbonTabInfoProvider
{
string RibbonTabUid { get; }
}
```
**Behavior:** Provides a mechanism for retrieving ribbon tab identification information. The `RibbonTabUid` property returns a unique string identifier used to locate specific ribbon tabs within the system.
---
### `IRibbonViewModel`
**Location:** `DTS.Common.RibbonControl` namespace
**Signature:**
```csharp
public interface IRibbonViewModel : IBaseViewModel
{
IRibbonView View { get; }
}
```
**Behavior:** Defines the contract for ribbon view models, exposing a read-only `View` property that returns the associated `IRibbonView` instance. Inherits from `IBaseViewModel`.
---
## 3. Invariants
- **`IRibbonView`** must always be assignable to `IBaseView` (inheritance constraint).
- **`IRibbonViewModel`** must always be assignable to `IBaseViewModel` (inheritance constraint).
- **`IRibbonTabInfoProvider.RibbonTabUid`** is expected to return a non-null string that uniquely identifies a ribbon tab (implied by the "unique identifier" documentation, though null validation is not enforced at the interface level).
- **`IRibbonViewModel.View`** is expected to return a valid `IRibbonView` instance (nullability is not specified in the interface).
---
## 4. Dependencies
### This module depends on:
- **`DTS.Common.Base`** — Provides `IBaseView` (used by `IRibbonView

View File

@@ -0,0 +1,50 @@
---
source_files:
- Common/DTS.Common/RibbonControl/View/RibbonView.cs
generated_at: "2026-04-17T16:43:31.203147+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "90c3894404f679ef"
---
# RibbonView Documentation
## 1. Purpose
`RibbonView` is a WPF view component that serves as a visual container for ribbon-style user interface elements. It exists to provide a concrete `UserControl` implementation of the `IRibbonView` interface, enabling view composition within the `DTS.Common.RibbonControl` namespace. This class appears to be a thin wrapper or marker class, likely intended to be extended via XAML or code-behind in derived implementations.
## 2. Public Interface
### RibbonView (Class)
**Signature:**
```csharp
public class RibbonView : UserControl, IRibbonView
```
**Location:** `DTS.Common.RibbonControl` namespace
**Description:** A WPF `UserControl` that implements `IRibbonView`. The class defines no additional members beyond those inherited from `UserControl` and whatever `IRibbonView` requires (interface definition not provided in source).
**Inherited Members:** All public members from `System.Windows.Controls.UserControl`.
## 3. Invariants
- `RibbonView` must always inherit from `UserControl`, making it suitable for WPF visual tree composition.
- `RibbonView` must always implement `IRibbonView` (contract requirements of this interface are not visible in the provided source).
- The class is `public` and `sealed` is not specified, implying it may be designed for inheritance.
## 4. Dependencies
**This module depends on:**
- `System.Windows.Controls` — Provides the `UserControl` base class.
- `IRibbonView` interface — Referenced but not defined in the provided source; presumably defined elsewhere in `DTS.Common.RibbonControl` or a related namespace.
**What depends on this module:**
- Unknown from source alone. Likely consumed by views or view factories within the ribbon control subsystem.
## 5. Gotchas
- **Empty class body:** The class contains no explicit members. Behavior is entirely derived from `UserControl` and any implicit interface implementation requirements from `IRibbonView`. It is unclear whether this is intentional (e.g., a XAML-first design) or incomplete.
- **IRibbonView contract unknown:** The interface `IRibbonView` is not defined in the provided source. Developers must locate its definition to understand what contractual obligations `RibbonView` must satisfy.
- **No explicit constructor:** The class relies on the default parameterless constructor inherited from `UserControl`. If `IRibbonView` requires specific initialization, it is not enforced at this level.

View File

@@ -0,0 +1,37 @@
---
source_files:
- Common/DTS.Common/RibbonControl/ViewModel/RibbonViewModel.cs
generated_at: "2026-04-17T16:43:10.907162+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "8dad9abf58642b0f"
---
# Documentation: RibbonViewModel.cs
## 1. Purpose
`RibbonViewModel<TModel>` is a generic base class for ribbon control view models in a WPF/Prism application. It provides common infrastructure for ribbon-based UI components including command management, lifecycle methods (initialization, activation, cleanup), status publishing via event aggregation, and property change notification. This class serves as a foundation for specific ribbon view model implementations that manage a model of type `TModel`.
---
## 2. Public Interface
### Class Declaration
```csharp
public class RibbonViewModel<TModel> : BasePropertyChanged, IRibbonViewModel
where TModel : class
```
### Constructor
- **`RibbonViewModel(IRibbonView view, IRegionManager regionManager, IEventAggregator eventAggregator, IUnityContainer unityContainer)`** (protected)
- Initializes the view model with required dependencies. Assigns `View`, `Aggregator`, `Container`, and `RegionManager` properties, then calls `CreateCommands()`.
### Properties
| Property | Type | Access | Description |
|----------|------|--------|-------------|
| `Aggregator` | `IEventAggregator` | protected get | Prism event aggregator for pub/sub messaging. |
| `Container` | `IUnityContainer` | protected get | Unity IoC container. |
| `RegionManager` | `IRegionManager` | protected get | Prism region manager for view composition. |
| `Model` | `TModel` | public get/set |