Skip to content

Document deferred renderer content lifecycle - #1117

Merged
wieslawsoltes merged 2 commits into
masterfrom
agent/issue-1090-vtk-render-window
Aug 18, 2026
Merged

Document deferred renderer content lifecycle#1117
wieslawsoltes merged 2 commits into
masterfrom
agent/issue-1090-vtk-render-window

Conversation

@wieslawsoltes

Copy link
Copy Markdown
Owner

Summary

  • explain that direct XAML content inside Document and Tool is deferred template content
  • document why parent-window FindControl calls cannot initialize nested renderer controls from InitializeComponent()
  • provide an MVVM-safe custom-control/attached-behavior lifecycle pattern
  • document direct renderer hosting and explicit stretch alignment when a ContentControl wrapper is required
  • add the same diagnosis to the FAQ

Root cause

The ActiViz RenderWindowControl is an OpenGlControlBase. In the issue reproduction, the VTK renderer setup depends on this call immediately after loading the parent window:

this.Find<RenderWindowControl>("VTKControl")

Dock compiles direct Document.Content XAML as deferred template content. A focused runtime check against the compiled DockXamlSample confirmed that, immediately after InitializeComponent(), the active document content has not been materialized and the parent view has no descendant content controls. The lookup therefore returns null, the attachment handler is never registered, and VTK displays an uninitialized blank surface.

Changing Dock to instantiate all document content eagerly would regress the intentional deferred/recycling architecture. The correct integration boundary is the renderer content's own attach/detach lifecycle, owned by a focused control, behavior, or service rather than parent-window code-behind.

Validation

  • focused runtime inspection of compiled direct-document XAML
  • isolated conceptual DocFX build: 0 errors, 1 existing api/toc.yml warning
  • git diff --check

The repository-wide check-docs.sh reaches and renders all conceptual files, but currently exits nonzero during unrelated API extraction because DocFX cannot load the newer ReactiveUI source generator (existing partial-property errors).

Fixes #1090

@wieslawsoltes
wieslawsoltes marked this pull request as ready for review July 14, 2026 21:30
@wieslawsoltes
wieslawsoltes merged commit 9d97059 into master Aug 18, 2026
4 checks passed
@wieslawsoltes
wieslawsoltes deleted the agent/issue-1090-vtk-render-window branch August 18, 2026 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DocumentDock failed to load Actiz.net window rendering

1 participant