DevExpress DockLayoutManager and Caliburn.Micro / ContentControl

Topics: Getting Started
Jan 30, 2013 at 8:29 AM
Edited Jan 30, 2013 at 12:20 PM

I have a small WPF application that uses Caliburn Micro to display two user controls with each a label inside. If I run the application I see the two labels.

 

<UserControl xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking"  x:Class="WpfApplication1.ShellView"
             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" 
             d:DesignHeight="300" d:DesignWidth="300">
    <StackPanel Width="300" Height="300" Background="LightBlue">
        <ContentControl x:Name="UC1" Height="100"></ContentControl>
        <ContentControl x:Name="UC2" Height="100"></ContentControl>
    </StackPanel>
</UserControl>

 

The next step is to make the two user controls Dockable by using DockLayoutManager like below, The problem is I see the two dockable panels but I don't see the usercontrols anymore, Why?

 

<UserControl xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking"  x:Class="WpfApplication1.ShellView"
             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" 
             d:DesignHeight="300" d:DesignWidth="300">
    <StackPanel Width="300" Height="300" Background="LightBlue">
        <!--<ContentControl x:Name="UC1" Height="100"></ContentControl>
        <ContentControl x:Name="UC2" Height="100"></ContentControl>-->
        <dxdo:DockLayoutManager>
            <dxdo:LayoutGroup Orientation="Vertical">
                <dxdo:LayoutPanel Caption="Panel1">
                    <ContentControl Height="100" x:Name="UC1"></ContentControl>
                </dxdo:LayoutPanel>
                <dxdo:LayoutPanel Caption="Panel2">
                    <ContentControl Height="100" x:Name="UC2"></ContentControl>
                </dxdo:LayoutPanel>
            </dxdo:LayoutGroup>
        </dxdo:DockLayoutManager>
    </StackPanel>
</UserControl>
Jan 30, 2013 at 9:24 AM

Caliburn.Micro does not know how to handle DevExpress controls/docking.

For this you might find Caliburn.Micro.DevExpress project helpful.

Jan 30, 2013 at 12:25 PM
Edited Jan 30, 2013 at 7:25 PM

-