5.2 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | |
|---|---|---|---|---|---|
|
2026-04-16T11:25:25.613899+00:00 | zai-org/GLM-5-FP8 | 1 | 0185c1c3d29b204b |
DockPanelVerticalViewModel Documentation
1. Purpose
DockPanelVerticalViewModel is a ViewModel component for a vertical dock panel UI element within a WPF/Prism-based application. It serves as the data context for IDockPanelVerticalView, managing notification/confirmation dialogs and exposing panel configuration state flags. The class inherits from BaseViewModel<IDockPanelVerticalViewModel> and integrates with Prism's event aggregation and region management infrastructure.
2. Public Interface
Constructor
public DockPanelVerticalViewModel(
IDockPanelVerticalView view,
IRegionManager regionManager,
IEventAggregator eventAggregator,
IUnityContainer unityContainer)
Initializes the ViewModel, sets the View's DataContext to itself, creates interaction requests, and subscribes to the RaiseNotification event.
Properties
| Property | Type | Access | Description |
|---|---|---|---|
View |
IDockPanelVerticalView |
get |
Reference to the associated view instance. |
NotificationRequest |
InteractionRequest<Notification> |
get |
Prism interaction request for displaying notifications. |
ConfirmationRequest |
InteractionRequest<Confirmation> |
get |
Prism interaction request for displaying confirmations. |
IsMenuIncluded |
bool |
get/set |
Flag indicating whether a menu is included in the panel. |
IsNavigationIncluded |
bool |
get/set |
Flag indicating whether navigation is included in the panel. |
IsBusy |
bool |
get/set |
Busy state indicator. |
IsDirty |
bool |
get (private set) |
Dirty state indicator; read-only externally. |
Events
public event PropertyChangedEventHandler PropertyChanged;
Declared but never invoked within this class.
Methods
| Method | Return Type | Behavior |
|---|---|---|
Initialize() |
void |
Throws NotImplementedException. |
Initialize(object parameter) |
void |
Throws NotImplementedException. |
Initialize(object parameter, object model) |
void |
Throws NotImplementedException. Uses new keyword. |
InitializeAsync() |
Task |
Throws NotImplementedException. |
InitializeAsync(object parameter) |
Task |
Throws NotImplementedException. |
Activated() |
void |
Throws NotImplementedException. |
Cleanup() |
void |
Throws NotImplementedException. |
CleanupAsync() |
Task |
Throws NotImplementedException. Uses new keyword. |
3. Invariants
- DataContext Binding: The View's
DataContextis always set tothisViewModel instance upon construction. - Event Subscription: The ViewModel subscribes to
RaiseNotificationevent during construction; the subscription lifetime is tied to the EventAggregator's scope. - Notification Transformation:
OnRaiseNotificationtransformsNotificationContentEventArgs(with title) intoNotificationContentEventArgs(without title) plus a separate Title string when raising the notification request.
4. Dependencies
This module depends on:
DTS.Common.Base—BaseViewModel<T>DTS.Common.Events—RaiseNotificationevent,NotificationContentEventArgsDTS.Common.Interface—IViewModel,IDockPanelVerticalViewModel,IDockPanelVerticalViewMicrosoft.Practices.Prism.Events—IEventAggregatorMicrosoft.Practices.Prism.Interactivity.InteractionRequest—InteractionRequest<T>,Notification,ConfirmationMicrosoft.Practices.Prism.Regions—IRegionManagerMicrosoft.Practices.Unity—IUnityContainer
What depends on this module:
- Unclear from source alone — No consumers are visible in this file. Likely consumed by View implementations and/or DI container registrations.
5. Gotchas
-
Incomplete Implementation: All lifecycle methods (
Initialize,InitializeAsync,Activated,Cleanup,CleanupAsync) throwNotImplementedException. This class appears to be a stub or work-in-progress. -
Member Hiding:
- The
_regionManagerfield usesnew, hiding a base class member of the same name. CleanupAsync()andInitialize(object parameter, object model)also usenew, hiding base implementations rather than overriding them.
- The
-
Unused
PropertyChangedEvent: The event is declared but never raised. If property change notification is expected by consumers, it will not function. -
Unused
ConfirmationRequest: TheConfirmationRequestproperty is instantiated but never raised anywhere in this class. -
Unused State Properties:
IsMenuIncluded,IsNavigationIncluded,IsBusy, andIsDirtyare declared but never read or written within this class (other than being auto-initialized). -
Potential Memory Leak: The
RaiseNotificationevent subscription does not appear to be unsubscribed in cleanup (though cleanup throws anyway). If the EventAggregator uses weak references, this may be safe; otherwise, it could cause memory retention issues.