ToolWindow allows content to render outside of window bounds when docked

Docking/MDI for WPF Forum

Posted 3 years ago by Shawn Kendrot
Version: 16.1.0631
Environment: Windows 10 (64-bit)
Avatar

Reproductin steps

Create a WPF application and place the following xaml in the window:

<docking:DockSite
    <docking:SplitContainer>
        <docking:Workspace>
        </docking:Workspace>

        <docking:ToolWindowContainer>
            <docking:ToolWindow x:Name="RedToolWindow" Title="Red Tool Window">
                <Rectangle Fill="Red" RenderTransformOrigin=".5,.5">
                    <Rectangle.RenderTransform>
                        <TranslateTransform X="200"/>
                    </Rectangle.RenderTransform>
                </Rectangle>
            </docking:ToolWindow>
        </docking:ToolWindowContainer>
        <docking:ToolWindowContainer>
            <docking:ToolWindow x:Name="BlueToolWindow" Title="Blue Tool Window">
                <Rectangle Fill="Blue">

                </Rectangle>
            </docking:ToolWindow>
        </docking:ToolWindowContainer>
    </docking:SplitContainer>
</docking:DockSite>
  1. Start the application.
  2. Undock the blue window and dock to the right of the red window
  3. BUG: Notice the red content from the window covers the blue window
  4. Undock the red window and dock to the left of the blue window
  5. Resize the red window to make it smaller and bigger
  6. BUG: Notice the red content does not cover the blue window but does bleed outside of the red window bounds.
  7. Undock the red window
  8. Notice no red extends past the window bounds

Comments (5)

Answer - Posted 3 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Shawn,

Thanks for reporting this.  It comes down to us needing this Setter on the Style for ToolWindow and DocumentWindow:

<Setter Property="ClipToBounds" Value="True" />

We'll put this in the next maintenance release but you can add it in an implicit style for now in your app too.


Actipro Software Support

Posted 3 years ago by Shawn Kendrot
Avatar

Thanks for adding it to your list for next release!

[Modified 3 years ago]

Posted 3 years ago by Gareth Parris - Software Developer, McLaren
Avatar

Great, we are seeing this problem too.

Posted 3 years ago by Gareth Parris - Software Developer, McLaren
Avatar

Do you know if this fix is in test release .632?

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

I believe so.  If you look in the preview build's Release History, you should see this item if it's included:

Updated DockingWindow.ClipToBounds to true by default to ensure content doesn't extend past the docking window edges.


Actipro Software Support

The latest build of this product (v2018.1 build 0675) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.