2.2 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | |||||
|---|---|---|---|---|---|---|---|---|---|
|
2026-04-17T15:36:06.822929+00:00 | zai-org/GLM-5-FP8 | 1 | 12c8c7227de24833 |
Documentation: DTS.Common.RibbonControl
1. Purpose
This module provides Prism region adapter support and event infrastructure for integrating WPF Ribbon controls into a Prism-based application. It enables dynamic addition and removal of RibbonTab and RibbonApplicationMenu items through Prism's region management system, synchronizes tab selection between document/workspace views and ribbon tabs via event aggregation, and exposes selection change notifications for consumers to react to ribbon tab changes.
2. Public Interface
Classes
RibbonRegionAdapter
Signature: public class RibbonRegionAdapter : RegionAdapterBase<Ribbon>, IDisposable
A Prism region adapter that adapts Microsoft.Windows.Controls.Ribbon.Ribbon for use with RegionNames.RibbonRegion. Handles synchronization between active views and ribbon tab selection.
| Member | Signature | Description |
|---|---|---|
| Constructor | RibbonRegionAdapter(IRegionBehaviorFactory regionBehaviorFactory, IRegionManager regionManager, IEventAggregator eventAggregator) |
Creates a new instance with injected dependencies. Subscribes to TabControlSelectionChanged event. |
Dispose() |
public void Dispose() |
Unsubscribes from TabControlSelectionChanged event and releases resources. |
Protected Members:
Adapt(IRegion region, Ribbon regionTarget)- HandlesActiveViews.CollectionChangedto add/removeRibbonTabandRibbonApplicationMenuitems.CreateRegion()- Returns a newAllActiveRegion.
RibbonControlSelectionChangeBehavior
Signature: public class RibbonControlSelectionChangeBehavior : Behavior<Ribbon>
A WPF behavior that attaches to a Ribbon and publishes RibbonControlSelectionChanged events when the ribbon's selection