3.3 KiB
3.3 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | |
|---|---|---|---|---|---|
|
2026-04-17T16:29:26.445526+00:00 | zai-org/GLM-5-FP8 | 1 | ce03b3583ccf9c32 |
ViewModel
Purpose
This module provides the DockPanelHorizontalViewModel class, a Prism-based ViewModel for a horizontal dock panel UI component in the DTS Viewer application. It serves as a mediator between the view (IDockPanelHorizontalView) and the application infrastructure, handling notification requests via Prism's InteractionRequest pattern and subscribing to application-wide RaiseNotification events.
Public Interface
Class: DockPanelHorizontalViewModel (extends BaseViewModel<IDockPanelHorizontalViewModel>, implements IDockPanelHorizontalViewModel)
Constructor:
public DockPanelHorizontalViewModel(
IDockPanelHorizontalView view,
IRegionManager regionManager,
IEventAggregator eventAggregator,
IUnityContainer unityContainer)
Initializes the ViewModel, sets the View's DataContext to itself, creates NotificationRequest and ConfirmationRequest instances, and subscribes to the RaiseNotification event.
Properties:
IDockPanelHorizontalView View { get; }— The associated view instance.InteractionRequest<Notification> NotificationRequest { get; }— Used to raise notification dialogs.InteractionRequest<Confirmation> ConfirmationRequest { get; }— Used to raise confirmation dialogs.bool IsMenuIncluded { get; set; }— UI state flag.bool IsNavigationIncluded { get; set; }— UI state flag.bool IsBusy { get; set; }— Indicates busy state.bool IsDirty { get; private set; }— Indicates unsaved changes.
Events:
event PropertyChangedEventHandler PropertyChanged— Declared but not explicitly invoked in visible code.
Methods:
void OnRaiseNotification(NotificationContentEventArgs eventArgsWithTitle)— Private handler that raisesNotificationRequestwith title, message, details, and image from the event args.override void Initialize()— ThrowsNotImplementedException.override void Initialize(object parameter)— ThrowsNotImplementedException.void Initialize(object parameter, object model)— ThrowsNotImplementedException(hides base withnew).override void Activated()— ThrowsNotImplementedException.override void Cleanup()— ThrowsNotImplementedException.Task CleanupAsync()— ThrowsNotImplementedException(hides base withnew).override Task InitializeAsync()— ThrowsNotImplementedException.override Task InitializeAsync(object parameter)— ThrowsNotImplementedException.
Invariants
- The View's
DataContextis always set to the ViewModel instance upon construction. - The ViewModel subscribes to
RaiseNotificationevent viaEventAggregatoron construction. IsDirtyis read-only externally (private setter).
Dependencies
Depends on:
DTS.Common.Base(BaseViewModel<T>)DTS.Common.Events(RaiseNotification,NotificationContentEventArgs,NotificationContentEventArgsWithoutTitle— inferred from usage)DTS.Common.Interface(IViewModel,IDockPanelHorizontalViewModel,IDockPanelHorizontalView)Microsoft.Practices.Prism.Events(`IEventAggregator