4.0 KiB
4.0 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | ||
|---|---|---|---|---|---|---|
|
2026-04-16T02:52:26.561259+00:00 | Qwen/Qwen3-Coder-Next-FP8 | 1 | 7ab53012cf3e9cb3 |
Resources
Documentation: DTS.Common.Resources Module
1. Purpose
This module provides shared UI resource definitions and event-driven tooltip handling for the main tab control in the application. It enables consistent naming of storyboard resources used for tab entry/exit transitions and centralizes the logic for publishing help-text events when tooltips are invoked on the main tab control—facilitating context-sensitive help functionality via Prism’s event aggregation pattern.
2. Public Interface
ResourceNames (internal static class)
EntryStoryboardName(public const string)
Constant string"InTransition"; represents the name of the storyboard used for tab entry animations.ExitStoryboardName(public const string)
Constant string"OutTransition"; represents the name of the storyboard used for tab exit animations.
MainTabControlResource (public partial class)
ToolTipEventHandler(object sender, ToolTipEventArgs e)(public void)
Handles theToolTipOpeningevent (or similar) for the main tab control. Setse.Handled = trueto prevent default tooltip behavior, resolvesIEventAggregatorfromContainerLocator.Container, and publishes aHelpTextEventwith aHelpTextEventArgcontaining the originalsenderandToolTipEventArgs.
3. Invariants
EntryStoryboardNameandExitStoryboardNameare compile-time constants and must match storyboard resource keys defined in XAML (not visible here, but implied by usage).ToolTipEventHandlermust only be attached to events wheresenderis a WPF control andeis aToolTipEventArgs—otherwise, casting or event semantics may fail.ContainerLocator.Containeris assumed to be initialized and contain a registeredIEventAggregatorinstance beforeToolTipEventHandleris invoked; failure to do so will cause a runtime exception (e.g.,NullReferenceExceptionor resolution failure).
4. Dependencies
Dependencies of this module:
Prism.Ioc/Prism.Events: Used viaIEventAggregator,ContainerLocator, andHelpTextEvent/HelpTextEventArgtypes.DTS.Common.Events: ContainsHelpTextEventandHelpTextEventArgtypes (not shown, but referenced).- WPF runtime types:
System.Windows.Controls.ToolTipEventArgs,System.Windows.Controls.ToolTip.
Dependencies on this module:
- XAML resources (not included) likely reference
ResourceNames.EntryStoryboardNameandResourceNames.ExitStoryboardNameas storyboard keys. - UI components (e.g.,
MainTabControlin XAML) must wireToolTipEventHandlerto the appropriate tooltip event (e.g.,ToolTipOpening) for help-text integration.
5. Gotchas
ContainerLocator.Containeris a static dependency—this introduces tight coupling and complicates unit testing; no DI container scoping is visible here.e.Handled = truesuppresses default tooltip rendering; if custom tooltip content is expected elsewhere (e.g., viaToolTipService), this may cause tooltips to appear blank unless handled by downstream subscribers.HelpTextEventArgconstructor is assumed to acceptsenderandeparameters, but its exact structure (e.g., property names, null-safety) is unknown from source.MainTabControlResourceis declaredpartial, implying additional partial definitions exist (likely inMainTabControlResource.xaml), but their contents are not visible—behavior may depend on XAML-defined event wiring.- No null checks are performed on
ContainerLocator.Container.Resolve<IEventAggregator>()ore—runtime exceptions may occur if the container is uninitialized oreis null.
None identified beyond these.