Quantcast
Channel: Extended WPF Toolkit™ Community Edition
Viewing all articles
Browse latest Browse all 4964

Commented Issue: [AvalonDock 2.1] Unable to dynamically properly add tools [20833]

$
0
0
Referring to AvalonDock 2.1 (Commit 106497), I setup a simple window with a DockManager.
```

<xcad:DockingManager
AnchorablesSource="{Binding Path=Tools}"
>
<xcad:DockingManager.Theme>
<xcad:AeroTheme />
</xcad:DockingManager.Theme>
<xcad:DockingManager.LayoutUpdateStrategy>
<local:LayoutInitializer />
</xcad:DockingManager.LayoutUpdateStrategy>
<xcad:LayoutRoot>
<xcad:LayoutPanel Orientation="Vertical">
<xcad:LayoutPanel Orientation="Horizontal">
<xcad:LayoutDocumentPane />
</xcad:LayoutPanel>
</xcad:LayoutPanel>
</xcad:LayoutRoot>
</xcad:DockingManager>
```

The goal is to be able to dynamicall add anchorable tools at run time, in the proper location.
The AnchorablesSource property is bound to an observable collection of ITool. ITool exposes a property specifying the preferred location for the tool. The LayoutInitializer attempts to position the tool in the proper pane when it is loaded.

In the attached example, the Window's Onloaded event simulates an user that attempts to load a couple of tools. My current implementation correctly behaves when a left tool is loaded before a bottom tool. Instead, it fails if the bottom tool is loaded first.

Any suggestion/bug fix/workaround would be appreciated.
Comments: ** Comment from web user: roastedamoeba **

Hi @BoucherS - I don't think this is fixed, in either v2.3 or v2.4.

I downloaded the sample application above (AvalondockSample.zip) and tried with a couple of NuGet packages: Xceed.Wpf.AvalonDock v2.4.14475.10340 and Extended.Wpf.Toolkit v2.3. The same crash still occurs with both versions, because parent == null.

I'm interested in this issue because it affects my project, Gemini (https://github.com/tgjones/gemini). Like the OP, I want to setup my LayoutPanels ahead of time, and add tools to them during runtime using an ILayoutUpdateStrategy.


Viewing all articles
Browse latest Browse all 4964

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>