Getting the Anchor property set correctly on a DockablePane

Apr 26, 2009 at 9:32 AM
Hi. I'm using the 1.2 version of AvalonDock. I've based the xaml of my main app window on the xaml of the AvalonDockTest - the previous version of AvalonDock, not 1.2.

My problem is that all of my DockablePanes default to a value of "Top" for their Anchor property and that property is readonly. In the AvalonDockTest app, the DockablePanes seem to have their Anchor property set as one would expect, except for the left one which is set to Top. When the DockablePanes are Auto-Hidden in my app, they all hide to the top which is not what I want. I want left, bottom, and right. I have a document container in the middle of the app. 

How do I set the Anchor property of my DockablePanes? How is that happening in the AvalonDockTest app?

I can run my app, and manually redock the left DockablePane to the left side. It will then behave as expected when auto-hidden (e.g. it will hide to the left side instead of the top).

Any help would be appreciated.

mhermes

Dec 27, 2010 at 12:51 PM

Hi, I'm having the same problem here. How can I control, to which sides the panes dock? (Don't have a document container in the middle)

I've got something like this:

<ad:DockingManager Margin="10"> 
	
	<ad:ResizingPanel Orientation="Horizontal">
		<ad:ResizingPanel Orientation="Vertical">					
			
			<!--Images-->
			<ad:DockablePane>
				<ad:DockableContent x:Name="filesContent" Title="Files">
					<DockPanel Background="#FF292929" LastChildFill="True" Margin="3">
						<Border Padding="3" DockPanel.Dock="Top">
							<TextBlock Text="Files" Foreground="WhiteSmoke" FontSize="16"></TextBlock>
						</Border>

						<views:ImageExplorerUserControl Margin="5" Background="#FF474747" DataContext="{Binding Path=ImageExplorerViewModel}" />

					</DockPanel>
				</ad:DockableContent>
			</ad:DockablePane>

			<!--Notification-->
			<ad:DockablePane ad:ResizingPanel.ResizeHeight="100">
				<ad:DockableContent x:Name="notificationContent" Title="Notifications" >
					<ListView></ListView>
				</ad:DockableContent>
			</ad:DockablePane>            
			
		</ad:ResizingPanel>

		<!--Settings-->
		<ad:DockablePane ad:ResizingPanel.ResizeWidth="250">
			<ad:DockableContent x:Name="settingsContent" Title="Settings">
				<DockPanel Background="#FF292929" LastChildFill="True" Margin="3">
					<Border Padding="3" DockPanel.Dock="Top">
						<TextBlock Text="Settings" Foreground="WhiteSmoke" FontSize="16"></TextBlock>
					</Border>
					<ListView Margin="5" Background="#FF474747" BorderThickness="0" />
				</DockPanel>
			</ad:DockableContent>
		</ad:DockablePane>

	</ad:ResizingPanel>
</ad:DockingManager>

Thanks, Martin