How can I clear the TransitionPresneter's DataContext

Docking/MDI for WPF Forum

Posted 13 years ago by Josh Dice
Version: 11.1.0545

In using the ANTS memory profiler I realized that the TransitionPresenter's DataContext in a ToolWindowContainer is hanging on to a reference of my view and I'd like to remove it when the window is closed. How can I do this? I don't see a way to get to the TransitionPresenter.

You can see a screenshot of the profiler's Instance Retention Graph here:

A little more background on what I'm doing....I have a DockSite that has many ToolWindows. When a ToolWindow is closed I am disposing the view and viewmodel then setting the content on the ToolWindow to null and hanging on to the name of the window in a local list. I'm doing this because I want to keep the window's last know location in case the user re-opens that specific window during the same session. When this happens I can grab the ToolWindow and set it's content to a new view.


Comments (1)

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Hi Josh,

If you can please put together a small sample project that reproduces your issue and email it over then we can take a closer look. Be sure to remove any executables or change the extension of the zip file to ensure it gets past our email filters.

Assuming the ToolWindowContainer's SelectedWindow/SelectedContent are being cleared properly, then the TransitionPresenter's DataContext should be cleared as well.

Actipro Software Support

The latest build of this product (v24.1.2) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.