55 lines
2.0 KiB
Markdown
55 lines
2.0 KiB
Markdown
|
|
---
|
||
|
|
source_files:
|
||
|
|
- Common/DTS.CommonCore/RibbonControl/RibbonControlSelectionChanged.cs
|
||
|
|
- Common/DTS.CommonCore/RibbonControl/RibbonControlOperation.cs
|
||
|
|
- Common/DTS.CommonCore/RibbonControl/RibbonControlSelectionEventArgs.cs
|
||
|
|
- Common/DTS.CommonCore/RibbonControl/RibbonControlSelectionChangeBehavior.cs
|
||
|
|
- Common/DTS.CommonCore/RibbonControl/RibbonRegionAdapter.cs
|
||
|
|
generated_at: "2026-04-17T15:35:45.238944+00:00"
|
||
|
|
model: "zai-org/GLM-5-FP8"
|
||
|
|
schema_version: 1
|
||
|
|
sha256: "58c3d04be273f67a"
|
||
|
|
---
|
||
|
|
|
||
|
|
# Documentation: DTS.Common.RibbonControl
|
||
|
|
|
||
|
|
## 1. Purpose
|
||
|
|
|
||
|
|
This module provides Prism region adapter support for integrating WPF `Ribbon` controls with the Prism navigation framework. It enables dynamic addition and removal of `RibbonTab` items through region management, synchronizes tab selection between document/workspace views and the ribbon, and publishes selection change events via the Prism event aggregator. The module bridges the gap between Prism's region-based view composition and the WPF Ribbon control's item management model.
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 2. Public Interface
|
||
|
|
|
||
|
|
### `RibbonControlOperation` (enum)
|
||
|
|
**File:** `RibbonControlOperation.cs`
|
||
|
|
|
||
|
|
Defines operation types for ribbon control changes.
|
||
|
|
|
||
|
|
| Member | Description |
|
||
|
|
|--------|-------------|
|
||
|
|
| `AddedItem` | Indicates an item has been added to the TabControl |
|
||
|
|
| `RemovedItem` | Indicates an item has been removed from the TabControl |
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
### `RibbonControlSelectionEventArgs` (class)
|
||
|
|
**File:** `RibbonControlSelectionEventArgs.cs`
|
||
|
|
|
||
|
|
Event arguments carrying information about ribbon selection changes.
|
||
|
|
|
||
|
|
```csharp
|
||
|
|
public RibbonControlSelectionEventArgs(RibbonControlOperation operation, object item)
|
||
|
|
```
|
||
|
|
|
||
|
|
| Property | Type | Description |
|
||
|
|
|----------|------|-------------|
|
||
|
|
| `Operation` | `RibbonControlOperation` | Gets the operation type (AddedItem or RemovedItem) |
|
||
|
|
| `Item` | `object` | Gets the added or removed tab control item |
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
### `RibbonControlSelectionChanged` (class)
|
||
|
|
**File:** `RibbonControlSelectionChanged.cs`
|
||
|
|
|
||
|
|
A Prism `
|