Hello.
I'm using XamDockManager and TabGroupPaneRegionAdaptor which brian Ragunas published.
When I add GLControl (OpenTK Canvas Control) into ContentPane via WindowsFormsHost, two problem happens.
First, Margin between ContentPane and GLControl Canvas is created.
Second, After added GLControl Canvas into ContentPane, the Canvas is resizable all along the canvas even if there are gridsplitters wrapping the canvas. that's not something I expected.
This only happens when I use XamDockManager and TabGroupPaneRegionAdapto both. No problem with XamDockManager only.
I'm attaching the bad and good case. Please check and give me any guide or hint.
GOOD CASE : https://github.com/jswpro/AddCanvasToContentPane.git
BAD CASE : https://github.com/jswpro/AddCanvasToContentPane2.git
thanks in advance.
I'd like to share what I found.
Actually I spent a lot of time on this.
I solve with below.
<gl:GLControl FormBorderStyle="None" />
thanks a lot anyway.
Thank you for the update.
Please do not hesitate to contact us if you have any other questions.
Thank you for your kind explanation.
This Helps a lot. I'm trying to find another way.
Hi,
I have reviewed the samples again and was able to reproduce the result illustrated on the screenshots you have shared.
Since this is reproducible only when the canvas hosted in WindowsFormsHost is used in a project with RegionAdapter my first suggestion was that there is an extra element that was added by the region. I have gone through the visual tree to check this and no such element was found. In fact, the elements and the settings were the same from the TabGroupPane down to the WindowsFormsHost element. That being said it seems that the cause for the behavior has something to do with the way the host is handling the WPF layout updates. The WindowsFormsHost sets some child properties including the Margin. In that specific scenario it is set to 3. You may have a look at some limitations and specific scenarios for using WindowsFormsHost in the following blog post: https://blogs.msdn.microsoft.com/scoberry/2006/09/01/gotchas-for-working-with-windows-formswpf-interop/ .
Thank you for your quick feedback.
I'm attaching a picture to describe the problem in more details.
Please review it again.
Sample are the same as previous. Please check below.