Files
DP44/docs/ai/DTS Viewer/DTS.Viewer/View/Navigation/ViewModel.md
2026-04-17 14:55:32 -04:00

27 lines
1.7 KiB
Markdown

---
source_files:
- DTS Viewer/DTS.Viewer/View/Navigation/ViewModel/NavigationViewModel.cs
generated_at: "2026-04-17T16:13:30.752772+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "9a2cd7ffc388b646"
---
# ViewModel
### Purpose
The `NavigationViewModel` class serves as the ViewModel component for the navigation region in a Prism-based WPF application. It manages the `ContextNavigationRegion` content area, handles notification display via event aggregation, and coordinates with a parent `IShellViewModel`. This module exists to decouple navigation logic from the view while providing notification capabilities through the Prism InteractionRequest pattern.
### Public Interface
**Constructor**
- `NavigationViewModel(INavigationView view, IRegionManager regionManager, IEventAggregator eventAggregator, IUnityContainer unityContainer)` — Initializes the view model, sets the view's DataContext, creates `NotificationRequest` and `ConfirmationRequest` interaction requests, and subscribes to the `RaiseNotification` event.
**Properties**
- `INavigationView NavigationView { get; }` — Returns the associated navigation view instance.
- `InteractionRequest<Notification> NotificationRequest { get; }` — Interaction request for displaying notifications.
- `InteractionRequest<Confirmation> ConfirmationRequest { get; }` — Interaction request for displaying confirmations.
- `object ContextNavigationRegion { get; set; }` — Gets or sets the content of the `NavigationRegion` from the underlying `NavigationView`. Raises `OnPropertyChanged` on set.
- `string HeaderInfo { get; }` — Always returns `"NavigationRegion"`.
- `bool IsBusy { get; set; }` — Throws `NotImplementedException` on both getter and setter.
- `bool IsDirty { get;