I am using radDocking in our Silverlight2 application. I currently have 2 docked panes of supplementary information.
In the example xaml below these are:
- radSplitCaseNotes - docked Right; (contains a RadGridView control)
- radSplitCaseDetail - docked Bottom
I also have a floating pane which will act as a context menu.
In the example xaml below:
- radSplitActionMenu - FloatingDockable
The docking panes work fine until I try and dock the ActionMenu floating pane to either the top or bottom of the compass on the docked CaseNotes pane. The pane docks fine but as when I try and undock teh ActionMenu pane again I get a "Layout Cycle Detected" error. It seems to be caused by the RadGridView control. (If I comment the RadGridView control out then it works fine).
I've included a cut-down version of the xaml that reproduces the problem and full details of the error below.
To reproduce the error, dock the Actions floating pane to the top or bottom of the Case Notes pane. Then try to drag it again to undock.
Thanks in advance...
Jonathan
======================================
Error Details:
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; MS-RTC LM 8)
Timestamp: Thu, 28 May 2009 09:41:21 UTC
Message: Unhandled Error in Silverlight 2 Application Exception from HRESULT: 0x88000FA8
at MS.Internal.XcpImports.MethodEx(IntPtr ptr, String name, CValue[] cvData)
at MS.Internal.XcpImports.MethodEx(DependencyObject obj, String name)
at MS.Internal.XcpImports.UIElement_UpdateLayout(UIElement element)
at System.Windows.UIElement.UpdateLayout()
at Telerik.Windows.Controls.RadDocking.ShowWindow(ToolWindow window)
at Telerik.Windows.Controls.RadDocking.OpenInToolWindow(RadPaneGroup radPaneGroup)
at Telerik.Windows.Controls.RadDocking.ShowElement(DragInfoEventArgs e)
at Telerik.Windows.Controls.RadDocking.OnDragDelta(Object sender, DragInfoEventArgs e)
at Telerik.Windows.Controls.Docking.DragInfoEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
at Telerik.Windows.RadRoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at Telerik.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RadRoutedEventArgs routedEventArgs)
at Telerik.Windows.RouteItem.InvokeHandler(RadRoutedEventArgs routedEventArgs)
at Telerik.Windows.EventRoute.InvokeHandlersImpl(Object source, RadRoutedEventArgs args, Boolean raisedAgain)
at Telerik.Windows.EventRoute.InvokeHandlers(Object source, RadRoutedEventArgs args)
at Telerik.Windows.RadRoutedEventHelper.RaiseEvent(DependencyObject element, RadRoutedEventArgs args)
at Telerik.Windows.DependencyObjectExtensions.RaiseEvent(DependencyObject element, RadRoutedEventArgs e)
at Telerik.Windows.Controls.Docking.PaneHeader.OnMouseMove(MouseEventArgs e)
at System.Windows.Controls.Control.OnMouseMove(Control ctrl, EventArgs e)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)
Line: 1
Char: 1
Code: 0
URI: http://localhost:1595/Default.html
Message: Unhandled Error in Silverlight 2 Application
Code: 4008
Category: RuntimeError
Message: Layout cycle detected. Layout could not complete.
MethodName:
Line: 53
Char: 13
Code: 0
URI: http://localhost:1595/Default.html
XAML
<UserControl x:Class="MatchOSCases.Page" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data" | |
xmlns:basics="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls" | |
xmlns:telerikDocking="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Docking" | |
xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation" | |
xmlns:grid="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView" | |
xmlns:uc="clr-namespace:MatchOSCases"> | |
<Grid x:Name="Modal3MatchOSBorder" RenderTransformOrigin="0.5,0.5" Visibility="Visible" Opacity="1"> | |
<Rectangle HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Opacity="0.35" Fill="#FF8A8A8A"/> | |
<Border Width="800" Height="530" Background="White" BorderThickness="1" BorderBrush="Black" CornerRadius="3" HorizontalAlignment="Center" VerticalAlignment="Center" x:Name="border" RenderTransformOrigin="0.5,0.5"> | |
<Grid x:Name="FormHolder" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> | |
<Grid.RowDefinitions> | |
<RowDefinition Height="Auto"/> | |
<RowDefinition Height="Auto"/> | |
<RowDefinition Height="36"/> | |
</Grid.RowDefinitions> | |
<TextBlock x:Name="lblAddValuesForm" Text="Match Outstanding Cases" FontSize="20" FontWeight="Bold" FontFamily="Trebuchet MS" Foreground="#FF00B0CA" Grid.Row="0" Margin="8,8,0,8"/> | |
<telerikDocking:RadDocking Grid.Row="1" > | |
<telerikDocking:RadDocking.DocumentHost> | |
<telerikDocking:RadSplitContainer x:Name="radModal3SplitDocumentHost"> | |
<telerikDocking:RadPaneGroup> | |
<telerikDocking:RadDocumentPane> | |
<Grid x:Name="gridMatchOSDataGrid" HorizontalAlignment="Left" VerticalAlignment="Top"> | |
<data:DataGrid HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Row="1" MinHeight="200" AutoGenerateColumns="False"> | |
<data:DataGrid.Columns> | |
<data:DataGridTextColumn Header="System Reference" /> | |
<!-- Binding="{Binding $$}" /> --> | |
<data:DataGridTextColumn Header="Reference 1" /> | |
<!-- Binding="{Binding $$}" --> | |
<data:DataGridTextColumn Header="Task" /> | |
<!-- Binding="{Binding $$}" --> | |
<data:DataGridTextColumn Header="Description" /> | |
<!-- Binding="{Binding $$}" --> | |
<data:DataGridTextColumn Header="Volume" /> | |
<!-- Binding="{Binding $$}" --> | |
<data:DataGridTextColumn Header="Target Date" /> | |
<!-- Binding="{Binding $$}" --> | |
<data:DataGridTextColumn Header="Team" /> | |
<!-- Binding="{Binding $$}" --> | |
<data:DataGridTextColumn Header="Individual" /> | |
<!-- Binding="{Binding $$}" --> | |
</data:DataGrid.Columns> | |
</data:DataGrid> | |
</Grid> | |
</telerikDocking:RadDocumentPane> | |
</telerikDocking:RadPaneGroup> | |
</telerikDocking:RadSplitContainer> | |
</telerikDocking:RadDocking.DocumentHost> | |
<telerikDocking:RadSplitContainer InitialPosition="FloatingDockable" Orientation="Vertical" x:Name="radSplitActionMenu" telerikDocking:RadDocking.FloatingLocation="640, 25" telerikDocking:RadDocking.FloatingSize="150, 200"> | |
<telerikDocking:RadPaneGroup ReorderTabRows="False"> | |
<telerikDocking:RadPane CanUserClose="False" Header="Actions..." CanDockInDocumentHost="False"> | |
<TextBlock Text="Menu Items" Margin="8,8,8,4"/> | |
</telerikDocking:RadPane> | |
</telerikDocking:RadPaneGroup> | |
</telerikDocking:RadSplitContainer> | |
<telerikDocking:RadSplitContainer InitialPosition="DockedBottom" x:Name="radSplitCaseDetail" telerikDocking:DockingPanel.InitialSize="800 220" > | |
<telerikDocking:RadPaneGroup> | |
<telerikDocking:RadPane CanUserClose="True" Header="Case Detail" CanDockInDocumentHost="False" x:Name="paneCaseDetail" Height="500"> | |
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"> | |
<TextBlock x:Name="lblFormReferences" Text="Case Details" Foreground="#FF062782" Grid.Row="0" Grid.Column="0" FontWeight="Bold" Margin="0,4,0,0"/> | |
</ScrollViewer> | |
</telerikDocking:RadPane> | |
</telerikDocking:RadPaneGroup> | |
</telerikDocking:RadSplitContainer> | |
<telerikDocking:RadSplitContainer InitialPosition="DockedRight" x:Name="radSplitCaseNotes" telerikDocking:DockingPanel.InitialSize="250 300"> | |
<telerikDocking:RadPaneGroup> | |
<telerikDocking:RadPane CanUserClose="True" Header="Case Notes" CanDockInDocumentHost="False" x:Name="paneCaseNotes"> | |
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"> | |
<Grid x:Name="gridCaseNotes"> | |
<Grid.RowDefinitions> | |
<RowDefinition Height="Auto"/> | |
<RowDefinition Height="Auto"/> | |
</Grid.RowDefinitions> | |
<grid:RadGridView x:Name="grdRadCaseNotes" IsReadOnly="True" RowIndicatorVisibility="Collapsed" AutoGenerateColumns="False" ColumnsWidthMode="Fill" Grid.Row="0" BorderThickness="1,1,1,1" Margin="0,0,0,0"> | |
<grid:RadGridView.Columns> | |
<grid:GridViewColumn HeaderText="ID" Width="50"/> | |
<grid:GridViewColumn HeaderText="Subject" Width="200"/> | |
<grid:GridViewColumn HeaderText="Date" Width="100"/> | |
</grid:RadGridView.Columns> | |
</grid:RadGridView> | |
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Row="1"> | |
<Button Width="75" Height="20" Content="Add" Margin="4,8,2,8" x:Name="btnAdd"/> | |
<Button Width="75" Height="20" Content="Print" Margin="2,8,8,8" x:Name="btnPrint"/> | |
</StackPanel> | |
</Grid> | |
</ScrollViewer> | |
</telerikDocking:RadPane> | |
</telerikDocking:RadPaneGroup> | |
</telerikDocking:RadSplitContainer> | |
</telerikDocking:RadDocking> | |
<StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,8,8"> | |
<Button x:Name="btnModal3_BookOut" Content="Book Out" MinWidth="75" Height="20"/> | |
<Button x:Name="btnModal3_Cancel" Content="Cancel" MinWidth="75" Height="20"/> | |
</StackPanel> | |
</Grid> | |
</Border> | |
</Grid> | |
</UserControl> | |