--- source_files: - Common/DTS.Common/obj/x86/Debug/Resources/MainTabControlResource.g.i.cs - Common/DTS.Common/obj/x86/Debug/Resources/MainTabControlResource.g.cs generated_at: "2026-04-17T15:40:58.277128+00:00" model: "zai-org/GLM-5-FP8" schema_version: 1 sha256: "7d2e742f998813e1" --- # Documentation: MainTabControlResource (Generated) ## 1. Purpose This module contains auto-generated code-behind for `MainTabControlResource.xaml`, a WPF `ResourceDictionary` that defines styles and resources for a main tab control UI component. The generated class facilitates XAML parsing, component loading, and event wire-up at runtime. It exists as part of the WPF build pipeline (PresentationBuildTasks) and bridges the XAML markup to the runtime object model. This resource is part of the `DTS.Common` assembly and provides centralized tab control styling for the application. --- ## 2. Public Interface ### Class: `MainTabControlResource` **Signature:** `public partial class MainTabControlResource : System.Windows.ResourceDictionary, System.Windows.Markup.IComponentConnector, System.Windows.Markup.IStyleConnector` A partial class representing the code-behind for the `MainTabControlResource.xaml` resource dictionary. Implements standard WPF markup interfaces for component initialization and style event connection. #### Methods | Method | Signature | Description | |--------|-----------|-------------| | `InitializeComponent` | `public void InitializeComponent()` | Loads the XAML resource from the assembly at path `/DTS.Common;component/resources/maintabcontrolresource.xaml`. Idempotent—subsequent calls return immediately if already loaded. | | `IComponentConnector.Connect` | `void IComponentConnector.Connect(int connectionId, object target)` | Explicit interface implementation. Sets `_contentLoaded = true`. Used by the XAML parser for named element connection. | | `IStyleConnector.Connect` | `void IStyleConnector.Connect(int connectionId, object target)` | Explicit interface implementation. Handles event setter wiring for styles. Currently handles `connectionId == 1` by attaching a `ToolTipEventHandler` to the `ToolTipOpeningEvent` on a `Style` target. | #### Fields | Field | Type | Description | |-------|------|-------------| | `_contentLoaded` | `private bool` | Tracks whether `InitializeComponent()` has been called. Prevents duplicate loading. | --- ## 3. Invariants - **Idempotent Initialization**: `InitializeComponent()` may be called multiple times safely; only the first call performs the load operation. - **Fixed Resource URI**: The resource locator is always `/DTS.Common;component/resources/maintabcontrolresource.xaml` with `UriKind.Relative`. - **Checksum Verification**: The file includes a pragma checksum (`433BC842528F2BF08865BDC9F7F4E3C6EAF63C0287392B36C24724AF9D799FA2`) for the source XAML file to ensure integrity. - **Partial Class Requirement**: The `MainTabControlResource` class is `partial`, requiring a companion code-behind file that defines the `ToolTipEventHandler` method referenced in `IStyleConnector.Connect`. - **Connection ID 1 Contract**: The `IStyleConnector.Connect`