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,189 @@
---
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-16T02:47:59.133790+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "8f96fa689f5431a2"
---
# RibbonControl Data Model Documentation
## 1. Purpose
This module defines a hierarchical data model for representing ribbon UI controls in a WPF application. It provides a set of data classes (`*Data`) that serve as view models for UI elements in a ribbon interface, enabling declarative construction of ribbon structures (tabs, groups, controls) with support for commands, images, tooltips, and dynamic state. The model supports standard controls (buttons, checkboxes, text boxes), menu-based controls (menu buttons, split buttons, menu items), and specialized controls (galleries, combo boxes), with built-in support for application menu structures and contextual tab groups. It is part of the `DTS.Common.RibbonControl` namespace and is intended to be consumed by UI rendering layers that bind to these data objects.
## 2. Public Interface
All classes are `public` and reside in the `DTS.Common.RibbonControl` namespace. Most implement `INotifyPropertyChanged`.
### Base Classes
- **`ControlData`**
Base class for all ribbon control data models. Provides common properties:
`string Label`, `Uri LargeImage`, `Uri SmallImage`, `string ToolTipTitle`, `string ToolTipDescription`, `Uri ToolTipImage`, `string ToolTipFooterTitle`, `string ToolTipFooterDescription`, `Uri ToolTipFooterImage`, `ICommand Command`, `string KeyTip`. All properties raise `PropertyChanged` on change.
- **`MenuButtonData : ControlData`**
Base class for controls that can host child controls (e.g., menu buttons, split buttons). Constructor accepts `bool isApplicationMenu`. Provides:
`bool IsVerticallyResizable`, `bool IsHorizontallyResizable`, `ObservableCollection<ControlData> ControlDataCollection` (lazy-initialized with sample content based on `ViewModelData` constants). Internally tracks `_nestingDepth` to limit recursive menu nesting.
- **`SplitButtonData : MenuButtonData`**
Extends `MenuButtonData`. Adds:
`bool IsChecked`, `bool IsCheckable`, `ButtonData DropDownButtonData` (lazy-initialized). Used for split buttons with a main action and dropdown.
### Leaf Controls
- **`ButtonData : ControlData`**
Simple button control.
- **`SeparatorData : ControlData`**
Visual separator control.
- **`GalleryItemData : ControlData`**
Item within a gallery.
- **`TextBoxData : ControlData`**
Text input control. Adds:
`string Text` (raises `PropertyChanged` on change).
- **`CheckBoxData : ControlData`**
Check box control. Adds:
`bool IsChecked` (raises `PropertyChanged` on change).
- **`RadioButtonData : ControlData`**
Radio button control. Adds:
`bool IsChecked` (raises `PropertyChanged` on change).
- **`ToggleButtonData : ControlData`**
Toggle button control. Adds:
`bool IsChecked` (raises `PropertyChanged` on change).
### Menu Hierarchy
- **`MenuItemData : SplitButtonData`**
Menu item. Constructor accepts optional `bool isApplicationMenu`. Used for standard menu items.
- **`SplitMenuItemData : MenuItemData`**
Split menu item. Constructor accepts optional `bool isApplicationMenu`.
- **`ApplicationMenuItemData : MenuItemData`**
Menu item specifically for the application menu. Constructor accepts optional `bool isApplicationMenu`.
- **`ApplicationSplitMenuItemData : SplitMenuItemData`**
Split menu item for the application menu. Constructor accepts optional `bool isApplicationMenu`.
- **`ComboBoxData : MenuButtonData`**
Combo box control (inherits from `MenuButtonData`, not `ControlData`).
### Container Classes
- **`GalleryCategoryData : ControlData`**
Category within a gallery. Provides:
`ObservableCollection<GalleryItemData> GalleryItemDataCollection` (lazy-initialized with 10 items per `ViewModelData.GalleryItemCount`, pre-populated with sample data including `ViewModelData.DefaultCommand`).
*Generic variant*: `GalleryCategoryData<T>` provides `ObservableCollection<T> GalleryItemDataCollection`.
- **`GalleryData : ControlData`**
Gallery control. Provides:
`ObservableCollection<GalleryCategoryData> CategoryDataCollection` (lazy-initialized with 3 categories per `ViewModelData.GalleryCategoryCount`, each with sample data),
`GalleryItemData SelectedItem`, `bool CanUserFilter`.
*Generic variant*: `GalleryData<T>` provides `ObservableCollection<GalleryCategoryData<T>> CategoryDataCollection`, `T SelectedItem`, `bool CanUserFilter`.
- **`GroupData : ControlData`**
Ribbon group. Constructor takes `string header`. Provides:
`ObservableCollection<ControlData> ControlDataCollection` (lazy-initialized with sample controls: 1 `ButtonData`, 1 `ToggleButtonData`, 1 `RadioButtonData`, 1 `CheckBoxData`, 1 `TextBoxData`, 1 `MenuButtonData`, 1 `SplitButtonData`, 1 `ComboBoxData`, per `ViewModelData` constants).
- **`TabData : INotifyPropertyChanged`**
Ribbon tab. Constructor takes optional `string header`. Provides:
`string Header`, `string ContextualTabGroupHeader`, `bool IsSelected`,
`ObservableCollection<GroupData> GroupDataCollection` (lazy-initialized with 3 groups per `ViewModelData.GroupCount`).
- **`ContextualTabGroupData : INotifyPropertyChanged`**
Contextual tab group container. Constructor takes optional `string header`. Provides:
`string Header`, `bool IsVisible`,
`ObservableCollection<TabData> TabDataCollection`.
- **`RibbonData : INotifyPropertyChanged`**
Top-level ribbon model. Provides:
`ObservableCollection<TabData> TabDataCollection` (lazy-initialized with 4 tabs; first 2 assigned to contextual tab groups),
`ObservableCollection<ContextualTabGroupData> ContextualTabGroupDataCollection` (lazy-initialized with 2 groups),
`MenuButtonData ApplicationMenuData` (lazy-initialized with sample data and `isApplicationMenu=true`).
### Static ViewModel Provider
- **`ViewModelData`**
Static class providing:
- `internal const int` constants defining default counts for various control types (e.g., `TabCount = 4`, `ButtonCount = 1`, `GalleryItemCount = 10`, etc.).
- `RibbonData RibbonData` (thread-static singleton).
- `ICommand DefaultCommand` (a `DelegateCommand` that always `CanExecute` and does nothing in `Execute`).
## 3. Invariants
- **Control hierarchy constraints**:
- `RibbonData` contains `TabData` instances, each of which belongs to a `ContextualTabGroupData` (via `ContextualTabGroupHeader`) or none.
- `TabData` contains `GroupData` instances.
- `GroupData` contains `ControlData` instances (including derived types).
- `MenuButtonData` and its descendants (`SplitButtonData`, `ComboBoxData`, `MenuItemData`, etc.) may contain nested `ControlData` instances.
- `GalleryData` contains `GalleryCategoryData`, which contains `GalleryItemData`.
- Nesting depth for menu items is limited to `ViewModelData.MenuItemNestingCount` (2) in `MenuButtonData.ControlDataCollection` initialization.
- **Initialization behavior**:
- Collections (`TabDataCollection`, `GroupDataCollection`, `ControlDataCollection`, `CategoryDataCollection`, etc.) are lazily initialized on first access and reused thereafter.
- Sample data (images, labels, tooltips) in collections is hardcoded using `/Common;component/RibbonControl/Images/Paste_16x16.png` and `Paste_32x32.png` URIs.
- `RibbonData.TabDataCollection` inserts tabs in reverse order (`i` from `TabCount` down to 1) to ensure correct visual ordering.
- **Property change notifications**:
- All properties in `ControlData` and derived classes raise `PropertyChanged` only when the new value differs from the current value (except `GalleryData<T>.SelectedItem`, which uses `Equals` for comparison).
- `RibbonData`, `TabData`, `ContextualTabGroupData` implement `INotifyPropertyChanged` and raise events for their properties.
- **Application menu flag**:
- The `isApplicationMenu` constructor parameter is passed down through `MenuItemData`, `SplitMenuItemData`, `ApplicationMenuItemData`, `ApplicationSplitMenuItemData`, and `MenuButtonData` to influence initialization logic (e.g., which `*Data` types are instantiated in `ControlDataCollection`).
## 4. Dependencies
### Internal Dependencies (within module)
- **`ViewModelData`**: Used by `GalleryCategoryData`, `GalleryData`, `MenuButtonData`, `GroupData`, `RibbonData` to populate collections with default counts and sample data.
- **`ViewModelData.DefaultCommand`**: Used as the default `Command` for sample controls.
- **`ViewModelData` constants**: Drive initialization logic in `GalleryCategoryData`, `GalleryData`, `MenuButtonData`, `GroupData`, `RibbonData`.
### External Dependencies
- **`System`**, **`System.Collections.ObjectModel`**, **`System.ComponentModel`**, **`System.Windows.Input`**: Standard .NET libraries for collections, property change notifications, and commands.
- **`Microsoft.Practices.Prism.Commands`**: Used for `DelegateCommand` in `ViewModelData.DefaultCommand`.
- **WPF image URIs**: Hardcoded URIs like `/Common;component/RibbonControl/Images/Paste_16x16.png` imply dependencies on embedded resources in the `Common` assembly.
### Inferred Usage
- This module is intended to be used by UI rendering layers (e.g., XAML views) that bind to `RibbonData`, `TabData`, `GroupData`, and `ControlData` instances.
- `RibbonData` is the primary entry point for ribbon configuration.
## 5. Gotchas
- **Thread-static singleton**: `ViewModelData.RibbonData` is `[ThreadStatic]`, meaning each thread gets its own instance. This may cause unexpected behavior if ribbon data is shared across threads without synchronization.
- **Hardcoded image paths**: URIs like `/Common;component/RibbonControl/Images/Paste_16x16.png` assume specific resource paths and assembly names. Changes to resource structure will break sample data.
- **Nesting depth limit**: `MenuButtonData.ControlDataCollection` stops adding nested items after `_nestingDepth` reaches `ViewModelData.MenuItemNestingCount` (2). This limit is not exposed or configurable.
- **`ComboBoxData` inheritance**: `ComboBoxData` inherits from `MenuButtonData`, not `ControlData`. This may be non-intuitive and implies it has `ControlDataCollection` and `IsVerticallyResizable`/`IsHorizontallyResizable` properties.
- **`SplitButtonData` vs `SplitMenuItemData`**: Both have `IsCheckable` and `IsChecked`, but `SplitButtonData` is a leaf control in groups, while `SplitMenuItemData` is part of a menu hierarchy. Their behaviors may differ contextually.
- **`GalleryData.SelectedItem` type mismatch**: Non-generic `GalleryData.SelectedItem` is `GalleryItemData`, while generic `GalleryData<T>.SelectedItem` is `T`. Ensure type consistency when using the generic variant.
- **`ControlData` vs `ControlDataCollection`**: `ControlDataCollection` is initialized only once per instance and reused. Modifying the collection after first access may have side effects if other code expects a fixed structure.
- **No validation**: No validation is performed on property values (e.g., `Label`, `KeyTip`, `Header`). Invalid values may cause UI rendering issues.
- **`IsApplicationMenu` flag propagation**: The `isApplicationMenu` flag is passed to constructors but only used in `MenuButtonData` initialization logic. Its effect on `MenuItemData`/`SplitMenuItemData` descendants is not evident from the source (they all accept the parameter but do not store or use it beyond base constructor calls).

View File

@@ -0,0 +1,64 @@
---
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-16T02:47:28.313603+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "05cab94a48e0b14d"
---
# Interface
## Documentation: Ribbon Control Interface Module
### 1. Purpose
This module defines core interfaces for the ribbon control UI component within the DTS.CommonCore library. It establishes a contract-based abstraction layer for ribbon-related view and view model components, enabling separation of concerns in a MVVM (Model-View-ViewModel) architecture. Specifically, it provides interfaces for identifying ribbon tabs (`IRibbonTabInfoProvider`), representing the ribbon view (`IRibbonView`), and managing the ribbon view model (`IRibbonViewModel`). These interfaces facilitate testability, modularity, and decoupling between UI presentation and business logic in applications using the ribbon control.
### 2. Public Interface
- **`IRibbonView`**
```csharp
public interface IRibbonView : IBaseView { }
```
A marker interface extending `IBaseView`. Represents the view layer for the ribbon control. No additional members are defined; consumers are expected to interact with the concrete implementation directly or via other interfaces (e.g., `IRibbonViewModel.View`).
- **`IRibbonTabInfoProvider`**
```csharp
public interface IRibbonTabInfoProvider
{
string RibbonTabUid { get; }
}
```
Provides a unique identifier (`RibbonTabUid`) for a ribbon tab. Intended to be implemented by objects (e.g., view models or data objects) that need to be associated with or located by a specific ribbon tab.
- **`IRibbonViewModel`**
```csharp
public interface IRibbonViewModel : IBaseViewModel
{
IRibbonView View { get; }
}
```
Represents the view model for the ribbon control. Exposes the associated `IRibbonView` instance via the `View` property. Extends `IBaseViewModel`, implying standard MVVM behaviors (e.g., property change notification, likely via `INotifyPropertyChanged`).
### 3. Invariants
- `IRibbonTabInfoProvider.RibbonTabUid` must return a non-null, non-empty string that uniquely identifies the ribbon tab within the application context.
- `IRibbonViewModel.View` must return a non-null reference to an object implementing `IRibbonView`.
- `IRibbonView` must be instantiated and assigned to `IRibbonViewModel.View` before the view model is used in UI binding or presentation.
- All interfaces inherit from base interfaces (`IBaseView`, `IBaseViewModel`), implying adherence to their respective contracts (e.g., lifecycle management, state handling), though specifics are not defined in this module.
### 4. Dependencies
- **Depends on**:
- `DTS.Common.Base` namespace (specifically `IBaseView` and `IBaseViewModel`).
- **Depended upon by**:
- Likely consumed by higher-level ribbon control implementations (e.g., concrete view/view model classes, UI frameworks, or DI containers) not visible in this source.
- `IRibbonTabInfoProvider` is presumably used by ribbon tab management logic (e.g., tab lookup, selection, or rendering systems).
- `IRibbonViewModel` is likely implemented by ribbon-specific view models and consumed by UI frameworks (e.g., WPF, WinUI) or view resolution systems.
### 5. Gotchas
- `IRibbonView` is a *marker interface* with no members; consumers must rely on concrete implementations or other interfaces (e.g., via reflection or casting) for functionality.
- The `RibbonTabUid` property in `IRibbonTabInfoProvider` has no validation or formatting constraints documented—implementation consistency (e.g., GUIDs, case sensitivity) must be enforced externally.
- No explicit threading or lifecycle guarantees are specified for `IRibbonViewModel.View` (e.g., thread affinity, disposal pattern).
- The module provides no mechanism for tab registration, ordering, or hierarchy—these concerns are outside its scope.
- None of the interfaces define methods for tab manipulation (e.g., add/remove), suggesting such logic resides elsewhere (e.g., in a ribbon controller or service).

View File

@@ -0,0 +1,36 @@
---
source_files:
- Common/DTS.CommonCore/RibbonControl/View/RibbonView.cs
generated_at: "2026-04-16T02:47:42.491319+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "ef8aa5ab3636aee8"
---
# View
## 1. Purpose
This module defines a WPF UI control, `RibbonView`, which serves as a concrete implementation of the `IRibbonView` interface for rendering ribbon-style user interfaces in the DTS.Common.RibbonControl namespace. It extends `UserControl` to integrate into WPF applications and acts as the view layer in a typical MVVM or similar presentation pattern, providing a container for ribbon UI elements (e.g., tabs, groups, buttons) whose behavior is governed by the `IRibbonView` contract.
## 2. Public Interface
- **`public class RibbonView : UserControl, IRibbonView`**
A WPF `UserControl` that implements the `IRibbonView` interface. No additional public members (methods, properties, events) are declared in this file; all behavior is inherited from `UserControl` and defined by `IRibbonView`.
## 3. Invariants
- `RibbonView` must be instantiated and used within a WPF UI thread context (as it derives from `UserControl`).
- As a class implementing `IRibbonView`, it is expected (per interface contract) to support ribbon-specific UI rendering and interaction, though the exact requirements are defined externally in `IRibbonView` (not present in this file).
- No explicit validation, state constraints, or ordering guarantees are specified in this source file.
## 4. Dependencies
- **Depends on**:
- `System.Windows.Controls` (WPF base UI types)
- `DTS.Common.RibbonControl.IRibbonView` (interface implemented by `RibbonView`; assumed defined elsewhere in the `DTS.Common.RibbonControl` namespace)
- **Depended on by**:
- Likely consumed by higher-level view models or application shells that rely on `IRibbonView` for dependency injection or binding.
- No direct dependents are visible in this file.
## 5. Gotchas
- The class is a thin wrapper with no custom logic in this file—any functional behavior is delegated to `IRibbonView` or inherited from `UserControl`.
- `IRibbonView` is referenced but not defined here; its contract (e.g., properties, methods, expected behavior) is critical to understanding `RibbonView`s purpose but cannot be inferred from this source alone.
- No XAML associated with this class is included; its visual structure and styling are defined externally (e.g., in a separate `.xaml` file or resource dictionary).
- None identified from source alone.

View File

@@ -0,0 +1,140 @@
---
source_files:
- Common/DTS.CommonCore/RibbonControl/ViewModel/RibbonViewModel.cs
generated_at: "2026-04-16T02:47:35.849821+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "62f46108ae312a85"
---
# ViewModel
## Documentation: `RibbonViewModel<TModel>`
---
### **1. Purpose**
`RibbonViewModel<TModel>` is a base view model class for ribbon-based UI views in the DTS application. It provides foundational infrastructure for command handling (e.g., closing), status reporting via Prisms event aggregation, model binding, and lifecycle management (initialization, activation, cleanup). It is designed to be subclassed by concrete ribbon view models (e.g., for specific ribbon tabs or panels), enforcing consistent behavior across ribbon-related UI components. The generic type parameter `TModel` allows binding to domain-specific data models while abstracting common ribbon concerns like busy state, dirty state, and UI element visibility toggles.
---
### **2. Public Interface**
#### **Properties**
- `public TModel Model { get; set; }`
Holds the domain model instance bound to this view model. Settable; cleared during `Cleanup()`.
- `public IRibbonView View { get; }`
Reference to the associated view (UI layer), injected via constructor.
- `public InteractionRequest<Confirmation> ConfirmationRequest { get; }`
Prism interaction request used to trigger confirmation dialogs (e.g., “Are you sure?”). Publicly exposed for XAML binding.
- `public DelegateCommand<object> CloseCommand { get; }`
Delegate command bound to UI close actions (e.g., close button). Executes `CloseMethod()`.
- `public bool IsMenuIncluded { get; set; }`
Controls visibility of the menu area in the ribbon UI. Defaults to `true`. Raises `PropertyChanged` on change.
- `public bool IsNavigationIncluded { get; set; }`
Controls visibility of the navigation area in the ribbon UI. Defaults to `false`. Raises `PropertyChanged` on change.
- `public int Percentage { get; set; }`
Represents progress percentage (e.g., for busy state). No validation or side effects observed.
- `public string IsBusyMessage { get; set; }`
Message displayed during busy state (e.g., “Saving…”). No automatic binding or update logic observed.
- `public bool IsBusy { get; set; }`
Indicates whether the view model is busy. No automatic status event publishing observed on change.
- `public bool IsDirty { get; set; }`
Indicates whether the model has unsaved changes. No automatic dirty-state handling logic observed.
#### **Methods**
- `public virtual void Activated()`
Called after the view model is activated (e.g., via Prism region navigation). Default implementation is a no-op; intended for override.
- `public virtual void Initialize()`
Publishes a `ShowStatus` event with `StatusState.Busy` and message `"Loading"` (from `Strings.Strings.Loading`). Intended for synchronous initialization.
- `public virtual void Initialize(object parameter)`
Same as `Initialize()`, but accepts a navigation/initialization parameter. Does not use the parameter in current implementation.
- `public void Initialize(object parameter, object model)`
**No implementation provided** — body is empty. Behavior undefined.
- `public virtual async Task InitializeAsync()`
Async version of `Initialize()`. Uses `Dispatcher.CurrentDispatcher.InvokeAsync()` to marshal the `ShowStatus` event publish to the UI thread.
- `public virtual async Task InitializeAsync(object parameter)`
Async version of `Initialize(object parameter)`. Same marshaling behavior; parameter unused.
- `public virtual void Cleanup()`
Sets `Model` to `default(TModel)` (i.e., `null` for reference types). Intended for releasing resources before disposal.
- `public Task CleanupAsync()`
**Throws `NotImplementedException`** — not implemented.
- `protected virtual void CloseMethod(object parameter)`
Invoked by `CloseCommand`. Calls `CleanupAtClose()`, which in turn calls `Cleanup()`.
- `protected virtual void CreateCommands()`
Initializes `ConfirmationRequest` and `CloseCommand`. Overridable for subclass command registration.
#### **Protected Properties**
- `protected IEventAggregator Aggregator { get; }`
Prism event aggregator for publishing/subscribing to events (e.g., `ShowStatus`).
- `protected IUnityContainer Container { get; }`
Unity DI container, available for resolution in subclasses.
- `protected IRegionManager RegionManager { get; }`
Prism region manager for navigation and region management.
---
### **3. Invariants**
- `Model` is settable but **must be cleared** (set to `null`) before the view model is fully disposed — this is enforced via `Cleanup()` called during close.
- `IsMenuIncluded` and `IsNavigationIncluded` default to `true` and `false`, respectively, but no runtime validation prevents invalid states.
- `IsBusy`, `IsDirty`, `Percentage`, and `IsBusyMessage` are **not** automatically synchronized with status events — they are independent properties with no side effects.
- `Initialize()` and `InitializeAsync()` **always** publish a `Busy` status with the hardcoded `"Loading"` message — no customization or override hook is provided in the base class.
- `Initialize(object parameter, object model)` is **unimplemented** — calling it has no effect.
---
### **4. Dependencies**
#### **Imports/Usings**
- `System`, `System.ComponentModel`, `System.Threading.Tasks`, `System.Windows.Threading`
- `DTS.Common.Base` (base class `BasePropertyChanged`)
- `DTS.Common.Events` (contains `ShowStatus` event and `StatusInfo`)
- `Microsoft.Practices.Prism.*` (Prism libraries: `DelegateCommand`, `InteractionRequest`, `Events`, `Regions`, `Unity`)
- `Microsoft.Practices.Unity` (`IUnityContainer`)
#### **External Contracts**
- `IRibbonView` — expected interface for the associated view (not defined here).
- `ShowStatus` event — published via `IEventAggregator` during initialization.
- `StatusInfo` — type used to convey status state (`Busy`, message string).
- `Strings.Strings.Loading` — localized string resource.
#### **Depended-on By**
- Subclasses of `RibbonViewModel<TModel>` (e.g., specific ribbon tab view models).
- UI layers (XAML) binding to `CloseCommand`, `ConfirmationRequest`, `IsMenuIncluded`, etc.
---
### **5. Gotchas**
- **`CleanupAsync()` is unimplemented** — throws `NotImplementedException`. Subclasses must override or avoid calling it.
- **`Initialize(object parameter, object model)` is a stub** — no logic or side effects. Passing a model here does nothing.
- **No automatic `IsBusy` ↔ status event sync** — setting `IsBusy = true` does *not* publish a `ShowStatus` event. Developers must manually publish `ShowStatus` if using `IsBusy`.
- **`Percentage`, `IsBusyMessage`, `IsDirty` are passive properties** — they have no built-in integration with status reporting or dirty-state tracking (e.g., no auto-save or validation).
- **`Initialize()` methods publish only `"Loading"`** — no way to customize the status message in the base class.
- **`Dispatcher.CurrentDispatcher` used in async methods** — assumes the view model is created on the UI thread. May fail if instantiated off-thread.
- **No explicit disposal pattern** — relies on `Cleanup()` being called (e.g., via `CloseCommand`), but no `IDisposable` implementation.
- **No validation on `Model` assignment** — setting `Model = null` mid-lifecycle is allowed and may leave view in inconsistent state if not handled by subclasses.
None identified beyond the above.