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

New Post: LayoutAnchorable content disappears when floating

$
0
0
I'm creating LayoutAnchorables in the code behind and floating them immediately. This all works fine including when I dock it with my mouse. When I undock it with my mouse by dragging it out, all the content disappears and I'm left with a blank white floating window. This is the code I'm using to create it.
LayoutAnchorable container = new LayoutAnchorable ();
            container.Title = e.Room.ID;
            container.Content = new RoomPanel (e.Room);
            container.FloatingWidth = 400;
            container.FloatingHeight = 500;
            layoutPanel.Children.Add (new LayoutAnchorablePane (container));
            container.Float ();
XAML
<xcad:DockingManager x:Name="dock">
            <xcad:DockingManager.Theme>
                <xcad:MetroTheme></xcad:MetroTheme>
            </xcad:DockingManager.Theme>
            <xcad:LayoutRoot>
                <xcad:LayoutPanel x:Name="layoutPanel">
                    <xcad:LayoutDocumentPane>
                        <xcad:LayoutDocument Title="Room Map" x:Name="roomMapPanelContainer" CanClose="False"  CanFloat="False">
                            <panels:RoomMapPanel x:Name="roomMapPanel"></panels:RoomMapPanel>
                        </xcad:LayoutDocument>
                        <xcad:LayoutAnchorable Title="General" x:Name="generalPanelContainer">
                            <panels:GeneralPanel x:Name="generalPanel"></panels:GeneralPanel>
                        </xcad:LayoutAnchorable>
                    </xcad:LayoutDocumentPane>
                </xcad:LayoutPanel>
            </xcad:LayoutRoot>
        </xcad:DockingManager>
This issue does not occur when I create it through XAML and place it in the same spot as the other 2 windows.

Am I missing something?

Viewing all articles
Browse latest Browse all 4964

Trending Articles



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