3.2 KiB
3.2 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | |
|---|---|---|---|---|---|
|
2026-04-17T16:14:09.336185+00:00 | zai-org/GLM-5-FP8 | 1 | 96ab4a7b54264b7e |
View
Purpose
This module contains the ShellViewModel class, which serves as the ViewModel for the main application shell in a WPF application built using the Prism framework. It acts as the orchestration layer for the UI, managing the view's DataContext, handling interaction requests (notifications/confirmations), and coordinating region navigation via the IRegionManager. It bridges the view (IShellView) and the backend services via dependency injection (IUnityContainer) and event aggregation (IEventAggregator).
Public Interface
ShellViewModel(IShellView view, IRegionManager regionManager, IEventAggregator eventAggregator, IUnityContainer unityContainer)- Constructor that initializes the ViewModel, sets the View's DataContext to itself, instantiates
InteractionRequestobjects, and subscribes to theRaiseNotificationevent.
- Constructor that initializes the ViewModel, sets the View's DataContext to itself, instantiates
void Initialize()/void Initialize(object parameter)- Empty initialization methods.
void Activated()- Empty activation method.
void Cleanup()- Throws
NotImplementedException.
- Throws
Task CleanupAsync()/Task InitializeAsync()/Task InitializeAsync(object parameter)- Asynchronous lifecycle methods that currently throw
NotImplementedException.
- Asynchronous lifecycle methods that currently throw
List<FrameworkElement> GetRegions()- Returns a list of framework elements named "Region" within the
MainShellgrid of the view.
- Returns a list of framework elements named "Region" within the
Object ContextMainRegion- Property that gets or sets the content of the
MainRegionContentControl in the View. TriggersOnPropertyChangedon set.
- Property that gets or sets the content of the
InteractionRequest<Notification> NotificationRequest- Property used to raise popup notifications in the UI.
InteractionRequest<Confirmation> ConfirmationRequest- Property used to raise confirmation dialogs in the UI.
- Properties:
Width,Height,IsMenuIncluded,IsNavigationIncluded,HeaderInfo(returns "MainRegion"),IsBusy,IsDirty(read-only).
Invariants
- The
Viewproperty is assigned in the constructor and is never expected to be null during the object's lifetime. NotificationRequestandConfirmationRequestare initialized immediately in the constructor and are never null.- The
HeaderInfoproperty always returns the string "MainRegion". IsDirtyis a read-only property (effectively always false/default unless logic exists elsewhere).
Dependencies
- Dependencies:
DTS.Common.Events(forRaiseNotification,NotificationContentEventArgs)DTS.Common.Interface(forIShellView,IViewerShellView,IViewerShellViewModel)DTS.Common.Utils(forUtils.GetChildrenByName)DTS.Common.BaseMicrosoft.Practices.Prism.Events(forIEventAggregator)Microsoft.Practices.Prism.Regions(forIRegionManager)Microsoft.Practices.Prism.Interactivity.InteractionRequestMicrosoft.Practices.Unity(forIUnityContainer)System.ComponentModel.Composition