Document windows side-by-side

Docking/MDI for WPF Forum

Posted 3 years ago by Procam
Version: 21.1.1
Avatar

Hello,

I have a docksite but want the documents to be displayed not as they would be in tabcontrol, what is the result in the following code:

<docking:DockSite x:Name="dockSite" CanDocumentWindowsFloat="True" FloatingWindowTitle="Procost" CanDocumentWindowsClose="False"
                  AreNewTabsInsertedBeforeExistingTabs="False" AreDocumentWindowsDestroyedOnClose="False">
        <!-- Workspace -->
        <docking:Workspace>
            <docking:TabbedMdiHost x:Name="tabbedMdiHost">
                <docking:TabbedMdiContainer>
                    <docking:DocumentWindow Title="first" CanDock="False" CanFloat="False" CanDragTab="False" />
                    <docking:DocumentWindow Title="second" CanDock="True" />
                </docking:TabbedMdiContainer>
            </docking:TabbedMdiHost>
        </docking:Workspace>
    </docking:DockSite>

but side-by-side, it means the document windows 'first' and 'second' to be visible at once, it means document window 'first to be docked in the left and 'second' to be docked on right side', with the splitter between them. What additional I need to set? And how to set the width of 'first' document?

Comments (2)

Posted 3 years ago by Procam
Avatar

I also tried this:

private void DockSiteP_OnLoaded(object sender, RoutedEventArgs e)
{
    first.Dock(dockSite, Side.Left);
}

but got exception:

  Name Value Type
$exception {"Specified argument was out of the range of valid values. (Parameter 'target')"} System.ArgumentOutOfRangeException

at ActiproSoftware.Windows.Controls.Docking.DocumentWindow.Dock(IDockTarget target, Side side)
.....

at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)
at System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root)
at MS.Internal.LoadedOrUnloadedOperation.DoWork()
at System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()
at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

Posted 3 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

To split the document area, you use the same "SplitContainer" used by tool windows. The following would result in a vertical splitter between left and right document areas:

<!-- Workspace -->
<docking:Workspace>
	<docking:TabbedMdiHost x:Name="tabbedMdiHost">
		<docking:SplitContainer>
			<docking:TabbedMdiContainer>
				<docking:DocumentWindow Title="first" CanDock="False" CanFloat="False" CanDragTab="False" />
			</docking:TabbedMdiContainer>
			<docking:TabbedMdiContainer>
				<docking:DocumentWindow Title="second" CanDock="True" />
			</docking:TabbedMdiContainer>
		</docking:SplitContainer>
	</docking:TabbedMdiHost>
</docking:Workspace>

For control over the width of the document window, please refer to the properties "ContainerDockedSize", "ContainerMaxSize" and "ContainerMinSize" to achieve your desired result. You can find the documentation for "ContainerDockedSize" here with the other properties right below it.

[Modified 3 years ago]


Actipro Software Support

The latest build of this product (v24.1.2) was released 2 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.