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

1.0 KiB

source_files, generated_at, model, schema_version, sha256
source_files generated_at model schema_version sha256
DTS Viewer/DTS.Viewer/RegionAdapters/StackPanelRegionAdapter.cs
2026-04-17T16:13:40.918650+00:00 zai-org/GLM-5-FP8 1 02157f0db2bb8b54

RegionAdapters

Purpose

This module provides a custom Prism Region Adapter for StackPanel controls, enabling the Prism region management system to dynamically add and remove UI elements within a StackPanel. It bridges the gap between Prism's region architecture and WPF's StackPanel container, allowing views to be composed dynamically at runtime.

Public Interface

  • StackPanelRegionAdapter(IRegionBehaviorFactory regionBehaviorFactory) (Constructor)

    • Initializes the adapter with the specified IRegionBehaviorFactory. Required by the base RegionAdapterBase<StackPanel>.
  • protected override void Adapt(IRegion region, StackPanel regionTarget)

    • Subscribes to the region.Views.CollectionChanged event and synchronizes the StackPanel.Children collection with the region's views. Handles `NotifyCollection