init
This commit is contained in:
315
docs/ai/Common/DTS.CommonCore/RibbonControl/Classes.md
Normal file
315
docs/ai/Common/DTS.CommonCore/RibbonControl/Classes.md
Normal file
@@ -0,0 +1,315 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/RibbonControl/Classes/ButtonData.cs
|
||||
- Common/DTS.CommonCore/RibbonControl/Classes/SeparatorData.cs
|
||||
- Common/DTS.CommonCore/RibbonControl/Classes/GalleryItemData.cs
|
||||
- Common/DTS.CommonCore/RibbonControl/Classes/ComboBoxData.cs
|
||||
- Common/DTS.CommonCore/RibbonControl/Classes/MenuItemData.cs
|
||||
- Common/DTS.CommonCore/RibbonControl/Classes/SplitMenuItemData.cs
|
||||
- Common/DTS.CommonCore/RibbonControl/Classes/ApplicationMenuItemData.cs
|
||||
- Common/DTS.CommonCore/RibbonControl/Classes/ApplicationSplitMenuItemData.cs
|
||||
- Common/DTS.CommonCore/RibbonControl/Classes/TextBoxData.cs
|
||||
- Common/DTS.CommonCore/RibbonControl/Classes/CheckBoxData.cs
|
||||
- Common/DTS.CommonCore/RibbonControl/Classes/RadioButtonData.cs
|
||||
- Common/DTS.CommonCore/RibbonControl/Classes/ToggleButtonData.cs
|
||||
- Common/DTS.CommonCore/RibbonControl/Classes/SplitButtonData.cs
|
||||
- Common/DTS.CommonCore/RibbonControl/Classes/ContextualTabGroupData.cs
|
||||
- Common/DTS.CommonCore/RibbonControl/Classes/ViewModel.cs
|
||||
- Common/DTS.CommonCore/RibbonControl/Classes/GalleryCategoryData.cs
|
||||
- Common/DTS.CommonCore/RibbonControl/Classes/TabData.cs
|
||||
- Common/DTS.CommonCore/RibbonControl/Classes/RibbonData.cs
|
||||
- Common/DTS.CommonCore/RibbonControl/Classes/GalleryData.cs
|
||||
- Common/DTS.CommonCore/RibbonControl/Classes/ControlData.cs
|
||||
- Common/DTS.CommonCore/RibbonControl/Classes/MenuButtonData.cs
|
||||
- Common/DTS.CommonCore/RibbonControl/Classes/GroupData.cs
|
||||
generated_at: "2026-04-17T15:27:41.426809+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "b5848407592cc670"
|
||||
---
|
||||
|
||||
# DTS.Common.RibbonControl Data Classes Documentation
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This module provides a data model layer for a WPF Ribbon control implementation. It defines a hierarchy of data classes that represent ribbon UI elements—tabs, groups, buttons, menus, galleries, and various input controls—each implementing `INotifyPropertyChanged` to support data binding. The module appears designed to serve as a ViewModel or data context layer, separating ribbon state from UI rendering concerns while providing auto-generated sample data for testing/demo purposes.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### ControlData (Base Class)
|
||||
**Namespace:** `DTS.Common.RibbonControl`
|
||||
|
||||
Base class for all ribbon control data objects. 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 title |
|
||||
| `ToolTipFooterDescription` | `string` | Tooltip footer description |
|
||||
| `ToolTipFooterImage` | `Uri` | Tooltip footer image URI |
|
||||
| `Command` | `ICommand` | Command executed on control activation |
|
||||
| `KeyTip` | `string` | Keyboard shortcut hint |
|
||||
|
||||
**Event:** `PropertyChanged` (from `INotifyPropertyChanged`)
|
||||
|
||||
---
|
||||
|
||||
### ButtonData
|
||||
Inherits from `ControlData`. No additional members—serves as a marker type for simple button controls.
|
||||
|
||||
---
|
||||
|
||||
### SeparatorData
|
||||
Inherits from `ControlData`. No additional members—represents a visual separator in menus/toolbars.
|
||||
|
||||
---
|
||||
|
||||
### GalleryItemData
|
||||
Inherits from `ControlData`. No additional members—represents an individual item within a gallery.
|
||||
|
||||
---
|
||||
|
||||
### TextBoxData
|
||||
Inherits from `ControlData`.
|
||||
|
||||
| Property | Type | Description |
|
||||
|----------|------|-------------|
|
||||
| `Text` | `string` | Current text content; raises `PropertyChanged("Text")` on change |
|
||||
|
||||
---
|
||||
|
||||
### CheckBoxData
|
||||
Inherits from `ControlData`.
|
||||
|
||||
| Property | Type | Description |
|
||||
|----------|------|-------------|
|
||||
| `IsChecked` | `bool` | Checked state; raises `PropertyChanged("IsChecked")` on change |
|
||||
|
||||
---
|
||||
|
||||
### RadioButtonData
|
||||
Inherits from `ControlData`.
|
||||
|
||||
| Property | Type | Description |
|
||||
|----------|------|-------------|
|
||||
| `IsChecked` | `bool` | Selected state; raises `PropertyChanged("IsChecked")` on change |
|
||||
|
||||
---
|
||||
|
||||
### ToggleButtonData
|
||||
Inherits from `ControlData`.
|
||||
|
||||
| Property | Type | Description |
|
||||
|----------|------|-------------|
|
||||
| `IsChecked` | `bool` | Toggled state; raises `PropertyChanged("IsChecked")` on change |
|
||||
|
||||
---
|
||||
|
||||
### MenuButtonData
|
||||
Inherits from `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>` | Lazy-initialized collection of child controls (auto-populated with sample data) |
|
||||
|
||||
---
|
||||
|
||||
### ComboBoxData
|
||||
Inherits from `MenuButtonData`. No additional members.
|
||||
|
||||
---
|
||||
|
||||
### SplitButtonData
|
||||
Inherits from `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 |
|
||||
| `IsCheckable` | `bool` | Whether the button can be toggled |
|
||||
| `DropDownButtonData` | `ButtonData` | Lazy-initialized button data for dropdown portion |
|
||||
|
||||
---
|
||||
|
||||
### MenuItemData
|
||||
Inherits from `SplitButtonData`.
|
||||
|
||||
| Constructor | Description |
|
||||
|-------------|-------------|
|
||||
| `MenuItemData()` | Creates instance with `isApplicationMenu = false` |
|
||||
| `MenuItemData(bool isApplicationMenu)` | Creates instance with specified application menu flag |
|
||||
|
||||
---
|
||||
|
||||
### SplitMenuItemData
|
||||
Inherits from `MenuItemData`.
|
||||
|
||||
| Constructor | Description |
|
||||
|-------------|-------------|
|
||||
| `SplitMenuItemData()` | Creates instance with `isApplicationMenu = false` |
|
||||
| `SplitMenuItemData(bool isApplicationMenu)` | Creates instance with specified application menu flag |
|
||||
|
||||
---
|
||||
|
||||
### ApplicationMenuItemData
|
||||
Inherits from `MenuItemData`.
|
||||
|
||||
| Constructor | Description |
|
||||
|-------------|-------------|
|
||||
| `ApplicationMenuItemData()` | Creates instance with `isApplicationMenu = false` |
|
||||
| `ApplicationMenuItemData(bool isApplicationMenu)` | Creates instance with specified application menu flag |
|
||||
|
||||
---
|
||||
|
||||
### ApplicationSplitMenuItemData
|
||||
Inherits from `SplitMenuItemData`.
|
||||
|
||||
| Constructor | Description |
|
||||
|-------------|-------------|
|
||||
| `ApplicationSplitMenuItemData()` | Creates instance with `isApplicationMenu = false` |
|
||||
| `ApplicationSplitMenuItemData(bool isApplicationMenu)` | Creates instance with specified application menu flag |
|
||||
|
||||
---
|
||||
|
||||
### GalleryCategoryData
|
||||
Inherits from `ControlData`.
|
||||
|
||||
| Property | Type | Description |
|
||||
|----------|------|-------------|
|
||||
| `GalleryItemDataCollection` | `ObservableCollection<GalleryItemData>` | Lazy-initialized collection (auto-populated with sample items) |
|
||||
|
||||
---
|
||||
|
||||
### GalleryCategoryData\<T\>
|
||||
Generic variant inheriting from `ControlData`.
|
||||
|
||||
| Property | Type | Description |
|
||||
|----------|------|-------------|
|
||||
| `GalleryItemDataCollection` | `ObservableCollection<T>` | Lazy-initialized generic collection |
|
||||
|
||||
---
|
||||
|
||||
### GalleryData
|
||||
Inherits from `ControlData`.
|
||||
|
||||
| Property | Type | Description |
|
||||
|----------|------|-------------|
|
||||
| `CategoryDataCollection` | `ObservableCollection<GalleryCategoryData>` | Lazy-initialized categories (auto-populated with sample data) |
|
||||
| `SelectedItem` | `GalleryItemData` | Currently selected gallery item |
|
||||
| `CanUserFilter` | `bool` | Whether user can filter gallery items |
|
||||
|
||||
---
|
||||
|
||||
### GalleryData\<T\>
|
||||
Generic variant inheriting from `ControlData`.
|
||||
|
||||
| Property | Type | Description |
|
||||
|----------|------|-------------|
|
||||
| `CategoryDataCollection` | `ObservableCollection<GalleryCategoryData<T>>` | Lazy-initialized generic categories |
|
||||
| `SelectedItem` | `T` | Currently selected item |
|
||||
| `CanUserFilter` | `bool` | Whether user can filter gallery items |
|
||||
|
||||
---
|
||||
|
||||
### GroupData
|
||||
Inherits from `ControlData`.
|
||||
|
||||
| Constructor | Description |
|
||||
|-------------|-------------|
|
||||
| `GroupData(string header)` | Creates instance with specified header label |
|
||||
|
||||
| Property | Type | Description |
|
||||
|----------|------|-------------|
|
||||
| `ControlDataCollection` | `ObservableCollection<ControlData>` | Lazy-initialized child controls (auto-populated with sample controls) |
|
||||
|
||||
---
|
||||
|
||||
### TabData
|
||||
Implements `INotifyPropertyChanged`.
|
||||
|
||||
| Constructor | Description |
|
||||
|-------------|-------------|
|
||||
| `TabData()` | Creates instance with null header |
|
||||
| `TabData(string header)` | Creates instance with specified header |
|
||||
|
||||
| Property | Type | Description |
|
||||
|----------|------|-------------|
|
||||
| `Header` | `string` | Tab display text |
|
||||
| `ContextualTabGroupHeader` | `string` | Header of associated contextual tab group |
|
||||
| `IsSelected` | `bool` | Selection state |
|
||||
| `GroupDataCollection` | `ObservableCollection<GroupData>` | Lazy-initialized groups (auto-populated with sample groups) |
|
||||
|
||||
---
|
||||
|
||||
### ContextualTabGroupData
|
||||
Implements `INotifyPropertyChanged`.
|
||||
|
||||
| Constructor | Description |
|
||||
|-------------|-------------|
|
||||
| `ContextualTabGroupData()` | Creates instance with null header |
|
||||
| `ContextualTabGroupData(string header)` | Creates instance with specified header |
|
||||
|
||||
| Property | Type | Description |
|
||||
|----------|------|-------------|
|
||||
| `Header` | `string` | Group display text |
|
||||
| `IsVisible` | `bool` | Visibility state |
|
||||
| `TabDataCollection` | `ObservableCollection<TabData>` | Lazy-initialized tabs collection |
|
||||
|
||||
---
|
||||
|
||||
### RibbonData
|
||||
Implements `INotifyPropertyChanged`.
|
||||
|
||||
| Property | Type | Description |
|
||||
|----------|------|-------------|
|
||||
| `TabDataCollection` | `ObservableCollection<TabData>` | Lazy-initialized tabs (auto-populated based on `ViewModelData.TabCount` and `ViewModelData.ContextualTabGroupCount`) |
|
||||
| `ContextualTabGroupDataCollection` | `ObservableCollection<ContextualTabGroupData>` | Lazy-initialized contextual groups |
|
||||
| `ApplicationMenuData` | `MenuButtonData` | Lazy-initialized application menu data |
|
||||
|
||||
---
|
||||
|
||||
### ViewModelData (Static Class)
|
||||
|
||||
| Constant | Type | Value | Description |
|
||||
|----------|------|-------|-------------|
|
||||
| `TabCount` | `int` | 4 | Number of tabs to generate |
|
||||
| `ContextualTabGroupCount` | `int` | 2 | Number of contextual groups |
|
||||
| `GroupCount` | `int` | 3 | Groups per tab |
|
||||
| `ControlCount` | `int` | 5 | Controls per group (unused) |
|
||||
| `ButtonCount` | `int` | 1 | Buttons per group |
|
||||
| `ToggleButtonCount` | `int` | 1 | ToggleButtons per group |
|
||||
| `RadioButtonCount` | `int` | 1 | RadioButtons per group |
|
||||
| `CheckBoxCount` | `int` | 1 | CheckBoxes per group |
|
||||
| `TextBoxCount` | `int` | 1 | TextBoxes per group |
|
||||
| `MenuButtonCount` | `int` | 1 | MenuButtons per group |
|
||||
| `MenuItemCount` | `int` | 2 | MenuItems per menu |
|
||||
| `SplitButtonCount` | `int` | 1 | SplitButtons per group |
|
||||
| `SplitMenuItemCount` | `int` | 2 | SplitMenuItems per menu |
|
||||
| `GalleryCount` | `int` | 1 | Galleries per menu |
|
||||
| `GalleryCategoryCount` | `int` | 3 | Categories per gallery |
|
||||
| `GalleryItemCount` | `int` | 10 | Items per gallery category |
|
||||
| `MenuItemNestingCount` | `int` | 2 | Maximum menu nesting depth |
|
||||
| `ComboBoxCount` | `int` | 1 | ComboBoxes per group |
|
||||
|
||||
| Property | Type | Description |
|
||||
|----------|------|-------------|
|
||||
| `RibbonData` | `RibbonData` | Thread-static lazy-initialized ribbon data instance |
|
||||
| `DefaultCommand` | `ICommand` | Lazy-initialized `DelegateCommand` that always executes successfully
|
||||
85
docs/ai/Common/DTS.CommonCore/RibbonControl/Interface.md
Normal file
85
docs/ai/Common/DTS.CommonCore/RibbonControl/Interface.md
Normal file
@@ -0,0 +1,85 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/RibbonControl/Interface/IRibbonView.cs
|
||||
- Common/DTS.CommonCore/RibbonControl/Interface/IRibbonTabInfoProvider.cs
|
||||
- Common/DTS.CommonCore/RibbonControl/Interface/IRibbonViewModel.cs
|
||||
generated_at: "2026-04-17T16:35:32.552431+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "8634f04ac6025c26"
|
||||
---
|
||||
|
||||
# RibbonControl Interface Module Documentation
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This module defines the core interfaces for a ribbon control UI component within an MVVM (Model-View-ViewModel) architecture. It provides abstractions for ribbon views (`IRibbonView`), view models that hold those views (`IRibbonViewModel`), and a mechanism for identifying specific ribbon tabs via unique identifiers (`IRibbonTabInfoProvider`). These interfaces establish the contract between UI components and their backing logic, enabling loose coupling and testability.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### `IRibbonView`
|
||||
**Namespace:** `DTS.Common.RibbonControl`
|
||||
**File:** `Interface/IRibbonView.cs`
|
||||
|
||||
```csharp
|
||||
public interface IRibbonView : IBaseView { }
|
||||
```
|
||||
|
||||
A marker interface extending `IBaseView`. No members are defined. Used to identify view implementations specific to ribbon controls.
|
||||
|
||||
---
|
||||
|
||||
### `IRibbonTabInfoProvider`
|
||||
**Namespace:** `DTS.Common.RibbonControl`
|
||||
**File:** `Interface/IRibbonTabInfoProvider.cs`
|
||||
|
||||
```csharp
|
||||
public interface IRibbonTabInfoProvider
|
||||
{
|
||||
string RibbonTabUid { get; }
|
||||
}
|
||||
```
|
||||
|
||||
Provides a mechanism for retrieving a unique identifier for a ribbon tab. Implementations expose a read-only `RibbonTabUid` property that returns a `string` identifier used to locate specific ribbon tabs.
|
||||
|
||||
---
|
||||
|
||||
### `IRibbonViewModel`
|
||||
**Namespace:** `DTS.Common.RibbonControl`
|
||||
**File:** `Interface/IRibbonViewModel.cs`
|
||||
|
||||
```csharp
|
||||
public interface IRibbonViewModel : IBaseViewModel
|
||||
{
|
||||
IRibbonView View { get; }
|
||||
}
|
||||
```
|
||||
|
||||
Defines the contract for a ribbon-specific view model. Extends `IBaseViewModel` and exposes a read-only `View` property that returns an `IRibbonView` instance, maintaining a reference from the view model to its associated view.
|
||||
|
||||
---
|
||||
|
||||
## 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 unique identifier string; the uniqueness guarantee is implied by the documentation but not enforced at compile time.
|
||||
- `IRibbonViewModel.View` is expected to return a non-null `IRibbonView` instance in valid usage, though this is not enforced by the interface.
|
||||
|
||||
---
|
||||
|
||||
## 4. Dependencies
|
||||
|
||||
### This module depends on:
|
||||
- **`DTS.Common.Base`** — Provides `IBaseView` and `IBaseViewModel` base interfaces that `IRibbonView` and `IRibbonViewModel` extend respectively.
|
||||
|
||||
### What depends on this module:
|
||||
- **Cannot be determined from source alone.** No imports or consumer code is present in the provided files.
|
||||
|
||||
---
|
||||
|
||||
## 5. Gotchas
|
||||
|
||||
- **`IRibbonView` is an empty marker interface.** It adds no members beyond `IBaseView`. This may be intentional for type discrimination, or it may indicate incomplete implementation
|
||||
19
docs/ai/Common/DTS.CommonCore/RibbonControl/View.md
Normal file
19
docs/ai/Common/DTS.CommonCore/RibbonControl/View.md
Normal file
@@ -0,0 +1,19 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/RibbonControl/View/RibbonView.cs
|
||||
generated_at: "2026-04-17T16:10:04.558694+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "74014a514590b4e8"
|
||||
---
|
||||
|
||||
# View
|
||||
|
||||
### Purpose
|
||||
This module defines `RibbonView`, a concrete user control component intended for use within a WPF (Windows Presentation Foundation) application. It serves as a visual container for Ribbon UI elements, implementing the `IRibbonView` interface to ensure integration with the broader system architecture, likely following a Model-View-ViewModel (MVVM) pattern.
|
||||
|
||||
### Public Interface
|
||||
* **`RibbonView` (Class)**
|
||||
* Inherits from `System.Windows.Controls.UserControl`.
|
||||
* Implements `IRibbonView`.
|
||||
* **Behavior**: Acts as a standard WPF UserControl. The source provided shows no explicit members
|
||||
31
docs/ai/Common/DTS.CommonCore/RibbonControl/ViewModel.md
Normal file
31
docs/ai/Common/DTS.CommonCore/RibbonControl/ViewModel.md
Normal file
@@ -0,0 +1,31 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/RibbonControl/ViewModel/RibbonViewModel.cs
|
||||
generated_at: "2026-04-17T16:39:18.825573+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "ebf586fff83bf3fe"
|
||||
---
|
||||
|
||||
# RibbonViewModel Documentation
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
`RibbonViewModel<TModel>` is a generic base class for ribbon control view models in a WPF application using the Prism framework. It provides common infrastructure for MVVM patterns including command management, view lifecycle methods (initialization, activation, cleanup), property change notification, and status publishing via event aggregation. The class is designed to be inherited by concrete view models that specify a model type `TModel`.
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### Constructor
|
||||
```csharp
|
||||
protected RibbonViewModel(IRibbonView view, IRegionManager regionManager, IEventAggregator eventAggregator, IUnityContainer unityContainer)
|
||||
```
|
||||
Protected constructor that initializes core dependencies and calls `CreateCommands()`. Only accessible to derived classes.
|
||||
|
||||
### Properties
|
||||
|
||||
| Property | Type | Access | Description |
|
||||
|----------|------|--------|-------------|
|
||||
| `Model` | `TModel` | get/set | The generic model instance associated with this view model. |
|
||||
| `View` | `IRibbonView` | get | The associated view reference. |
|
||||
| `ConfirmationRequest` | `InteractionRequest<Confirmation>` | get | Prism interaction request for displaying confirmations. |
|
||||
| `CloseCommand` | `DelegateCommand<object>` | get | Command that executes `CloseMethod` when invoked
|
||||
Reference in New Issue
Block a user