ToolWindow IsFloating MVVM Binding

Docking/MDI for WPF Forum

Posted 4 years ago by JP Garza
Version: 19.1.0685


How would I bind to my ToolWindow's IsFloating attribute?

I currently have this code:

<docking:DockSite x:Name="outerDockSite">
  <docking:ToolWindowContainer x:Name="outerToolWindowContainer">
    <docking:ToolWindow x:Name="outerToolWindow" IsFloating={binding IsToolWindowFloating, mode=OneWayToSource}>

but IsToolWindowFloating is not getting updated even though I am seeing the ToolWindow IsFloating is changing in the visual tree properties.

Note: out of all the binding in my ViewModel this is the only one not working. I don't think the problem is on the .cs implementation of IsToolWindowFloating.

Thanks and Best!

[Modified 4 years ago]

Comments (2)

Posted 4 years ago by Actipro Software Support - Cleveland, OH, USA

Hi JP,

It should be working ok.  I just did a successful test.

If you look at our MvvmToolWindows QuickStart, it is showing a ListView that binds to various properties like IsFloating of the view-model to show their current state.  That seems to be updating ok when I float a tool window there.  That would mean the actual ToolWindow is pushing its IsFloating state back to the view-model ok, and then the ListView is showing the updated view-model's IsFloating value.

Actipro Software Support

Posted 4 years ago by JP Garza

For some reason when you dock the ToolWindow it does not notify the viewmodel that IsFloating has changed. Since that did not work for me I moved to a solution of binding to the controler itself:

{Binding ElementName=myToolWindow, Path=IsFloating}

Thank you.

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.