Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Since the Avalon DocumentPane and DockingPane are both based on the System.Windows.Controls.Primitives.Selector you can use the default SelectorRegionAdapter in Prism.</p> <p>Just base your control on DockableContent</p> <pre><code>&lt;ad:DockableContent x:Class="DesignerWPF.UserControl1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d" xmlns:ad="clr-namespace:AvalonDock;assembly=AvalonDock" d:DesignHeight="300" d:DesignWidth="300" Title="dans"&gt; &lt;Grid&gt; &lt;TextBox Text="sdfdf"&gt;&lt;/TextBox&gt; &lt;/Grid&gt; &lt;/ad:DockableContent&gt; </code></pre> <p>on your main Shell.xmal set the regions in the dockablepane</p> <pre><code> &lt;ad:DockingManager x:Name="dockManager" Grid.Row="1" Margin="0,4,0,0"&gt; &lt;ad:ResizingPanel Orientation="Horizontal"&gt; &lt;ad:DockablePane cal:RegionManager.RegionName="LeftRegion"&gt; &lt;/ad:DockablePane&gt; &lt;ad:DocumentPane cal:RegionManager.RegionName="DocumentRegion"&gt; &lt;/ad:DocumentPane&gt; &lt;/ad:ResizingPanel&gt; &lt;/ad:DockingManager&gt; </code></pre> <p>then when you initialize your presenter for your control it will get displayed in the dock.</p> <pre><code>public class UserTestControl : IModule { public UserTestControl(IUnityContainer container, IRegionManager regionManager) { Container = container; RegionManager = regionManager; } public void Initialize() { var addFundView = Container.Resolve&lt;UserControl1&gt;(); RegionManager.Regions["LeftRegion"].Add(addFundView); } public IUnityContainer Container { get; private set; } public IRegionManager RegionManager { get; private set; } } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload