--- source_files: - DTS Viewer/DTS.Viewer.Loader/View/ShellView.xaml.cs generated_at: "2026-04-16T11:27:08.367475+00:00" model: "zai-org/GLM-5-FP8" schema_version: 1 sha256: "5592dd58a3630256" --- # Documentation: ShellView.xaml.cs ## 1. Purpose `ShellView` is the main shell window component for the DTS Viewer application. It serves as the primary container/view for the application's user interface, implementing the `IShellView` interface to integrate with the broader system architecture. The class handles window initialization and ensures the application launches in a maximized state. ## 2. Public Interface ### `ShellView` (class) **Signature:** ```csharp public partial class ShellView : IShellView ``` **Description:** A WPF window control that serves as the application's main shell. Implements `IShellView` from `DTS.Common.Interface`. --- ### `ShellView()` (constructor) **Signature:** ```csharp public ShellView() ``` **Description:** Default constructor that initializes the window component and sets the initial window state. **Behavior:** 1. Calls `InitializeComponent()` to load the XAML-defined UI 2. Sets `this.WindowState = WindowState.Maximized` to launch the window in maximized mode ## 3. Invariants - The window will always initialize in a maximized state (`WindowState.Maximized`). - The class is a partial class, implying a companion XAML file (`ShellView.xaml`) must exist and define the visual tree. - The class must implement `IShellView`, though the specific interface members are not visible in this source file. ## 4. Dependencies ### This module depends on: - **`System.Windows`** - WPF framework for window management (`Window`, `WindowState`, `ResizeMode`) - **`DTS.Common.Interface.IShellView`** - Interface contract this view implements ### What depends on this module: - Cannot be determined from this source file alone. Likely consumed by a bootstrapper, main entry point, or an IoC container that resolves `IShellView`. ## 5. Gotchas - **Commented-out `StateChanged` handler:** There is disabled code that would have toggled `ResizeMode` between `ResizeMode.NoResize` (when maximized) and `ResizeMode.CanResize` (otherwise). The reason for commenting this out is unclear from source alone—this may be intentional behavior removal or a pending fix. - **No explicit interface implementation visible:** The source shows `IShellView` is implemented, but no interface members are explicitly defined in this file. They may be auto-implemented properties or defined in the XAML code-behind.