Files
2026-04-17 14:55:32 -04:00

4.6 KiB
Raw Permalink Blame History

source_files, generated_at, model, schema_version, sha256
source_files generated_at model schema_version sha256
Common/DTS.Common/obj/x86/Debug/BusyIndicatorManager/xBusyIndicator.g.i.cs
Common/DTS.Common/obj/x86/Debug/BusyIndicatorManager/xBusyIndicator.g.cs
2026-04-16T02:57:03.548766+00:00 Qwen/Qwen3-Coder-Next-FP8 1 8a85dd764831c7b1

BusyIndicatorManager

Documentation: xBusyIndicator Class

1. Purpose

The xBusyIndicator class is a custom WPF control that extends Xceed.Wpf.Toolkit.BusyIndicator to provide a project-specific busy indicator implementation within the DTS.Common library. It encapsulates UI-level configuration and initialization logic defined in the corresponding XAML file (xBusyIndicator.xaml), enabling consistent visual behavior and styling for indicating asynchronous operations across the application. This class exists to allow centralized customization of the busy indicators appearance and behavior beyond what the base Xceed.Wpf.Toolkit.BusyIndicator provides, while leveraging WPFs component initialization infrastructure.

2. Public Interface

The class exposes only one public method (inherited from Xceed.Wpf.Toolkit.BusyIndicator, not overridden or extended in the provided source):

  • void InitializeComponent()
    • Signature: public void InitializeComponent()
    • Behavior: Initializes the component by loading the associated XAML resource (/DTS.Common;component/busyindicatormanager/xbusyindicator.xaml) via Application.LoadComponent. Ensures initialization occurs only once via the _contentLoaded flag. Must be called during construction (typically from the constructor, though not shown here—standard WPF pattern).

No other public methods, properties, or events are defined or overridden in this generated file. All public members of Xceed.Wpf.Toolkit.BusyIndicator (e.g., IsBusy, BusyContent, BusyContentTemplate) remain available via inheritance.

3. Invariants

  • _contentLoaded is false initially and set to true upon first successful call to InitializeComponent(). Subsequent calls to InitializeComponent() are no-ops.
  • The XAML resource URI used is strictly relative: /DTS.Common;component/busyindicatormanager/xbusyindicator.xaml.
  • InitializeComponent() must be called exactly once per instance before UI interaction; calling it after UI interaction may cause undefined behavior (though the _contentLoaded guard prevents re-execution).
  • The class implements System.Windows.Markup.IComponentConnector.Connect, but the implementation is minimal and does not perform any connection logic beyond setting _contentLoaded = true.

4. Dependencies

  • Runtime/Platform: .NET Framework 4.0 (based on Runtime Version:4.0.30319.42000).
  • WPF Framework: System.Windows.*, System.Windows.Controls.*, System.Windows.Markup, etc.
  • Third-party Libraries:
    • Xceed.Wpf.Toolkit and multiple sub-namespaces (e.g., Xceed.Wpf.Toolkit, Xceed.Wpf.Toolkit.Core.*, Xceed.Wpf.Toolkit.PropertyGrid, etc.).
    • Microsoft.Windows.Controls (likely part of the WPF Toolkit or similar).
  • Source Dependency: Requires the XAML file BusyIndicatorManager\xBusyIndicator.xaml at build time (referenced via relative path in resourceLocater).
  • Depended upon by: Unknown from this file alone—likely consumed by other modules in DTS.Common or the main application, but no explicit references are visible here.

5. Gotchas

  • Generated Code Warning: This file is auto-generated by PresentationBuildTasks (WPF build tools). Manual edits will be overwritten on rebuild.
  • No Custom Logic Visible: The provided source contains only boilerplate initialization logic. Any custom behavior (e.g., overrides of OnIsBusyChanged, custom styling hooks, or附加 properties) must reside in the corresponding partial class file (e.g., xBusyIndicator.xaml.cs), which is not included here.
  • Hardcoded Resource Path: The XAML resource path is hardcoded and relative to the assembly root (/DTS.Common;component/...). Moving or renaming xBusyIndicator.xaml without updating the build action or this path will cause runtime failures.
  • No Public Constructor Shown: The constructor (where InitializeComponent() is typically invoked) is not present in this file. Its existence and implementation are inferred but not verifiable from this source.
  • Interface Implementation is Minimal: The IComponentConnector.Connect method does not wire any named elements (e.g., x:Name="PART_BusyContent"), suggesting either no named elements exist in the XAML, or wiring is handled implicitly by the base class.

None identified beyond the above.