0

This is my very simple Layout in a DockPanel:

...

<xcad:LayoutRoot x:Name="LayoutRoot">
    <xcad:LayoutPanel Orientation="Horizontal">
        <xcad:LayoutDocumentPaneGroup>
            <xcad:LayoutDocumentPane/>
        </xcad:LayoutDocumentPaneGroup>

        <xcad:LayoutAnchorablePaneGroup DockWidth="250">
            <xcad:LayoutAnchorablePane>
                <xcad:LayoutAnchorable Title="Properties">
                    <Grid>
                    </Grid>
                </xcad:LayoutAnchorable>
            </xcad:LayoutAnchorablePane>
        </xcad:LayoutAnchorablePaneGroup>

    </xcad:LayoutPanel>
</xcad:LayoutRoot>

...

When running the app it shows a nice window with an empty "Properties" panel to the right. I can unpin it and it will hide. All nice and easy. However, when I try to unhide the panel, my app goes into break mode...

I use VisualStudio 2015 Community with C#6 language features and .NET 4.5.2, WPF Extended Toolkit 2.9

Any ideas what I do wrong?

Andreas
  • 1,551
  • 4
  • 24
  • 55

1 Answers1

1

After debugging into the WPF Extended Toolkit I found the place that causes the problem. Now, equipped with the right questions I was able to make Google answer my question.

This question is a duplicate. The solution can be found here:

https://stackoverflow.com/a/37905416/558239

EDIT

I found applying this solution results in being no longer able to terminate the application, the debugger in VS was still running...

The only solution I found so far was to comment out the causing code in the WPF Extended Toolkit source:

Class: Xceed.Wpf.AvalonDock.Controls.LayoutAutoHideWindowControl

Comment out method

protected override IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled)

which can be found around line 120.

So far, I could not see side effects, but I just played around a bit on Windows 10...

EDIT II

I finally took this solution as it does not require me to change anything on the library code:

https://stackoverflow.com/a/39923081/558239

Community
  • 1
  • 1
Andreas
  • 1,551
  • 4
  • 24
  • 55
  • I am not getting any exception with the sample application provided by Xceed. the only difference i am seeing is that i am in Windows 7 and you are testing in Windows 10. – Abin Oct 26 '16 at 12:54