This question is locked. New answers and comments are not allowed.
Hello,
pane.RemoveFromParent() crashes with
Q3 release.
I have an application with 2 RadPaneGroups. I add RadPanes to the first group. I want to programmatically move a pane from one group to the other.
XAML:
| <docking:RadDocking x:Name="Docking" Grid.Row="1" > |
| <docking:RadSplitContainer x:Name="dockLeft" > |
| <docking:RadPaneGroup x:Name="toolsGroup" > |
| </docking:RadPaneGroup> |
| <docking:RadPaneGroup x:Name="debugGroup" |
| </docking:RadPaneGroup> |
| </docking:RadSplitContainer> |
| <docking:RadDocking.DocumentHost> |
| <docking:RadSplitContainer x:Name="splitContainer1"> |
| <docking:RadPaneGroup x:Name="mapGroup" > |
| </docking:RadPaneGroup> |
| <docking:RadPaneGroup x:Name="rightMapGroup"> |
| </docking:RadPaneGroup> |
| </docking:RadSplitContainer> |
| </docking:RadDocking.DocumentHost> |
| </docking:RadDocking> |
Create and add pane to RadPaneGroup:
| RadPane newPane = new RadPane(); |
| newPane.Header = new TextBlock() { |
| Text = mapName |
| }; |
| newPane.CanFloat = false; |
| newPane.CanDockInDocumentHost = false; |
| newPane.CanUserClose = false; |
| newPane.Tag = index; |
| ScrollViewer sv = new ScrollViewer(); |
| sv.VerticalScrollBarVisibility = System.Windows.Controls.ScrollBarVisibility.Disabled; |
| sv.HorizontalScrollBarVisibility = System.Windows.Controls.ScrollBarVisibility.Disabled; |
| sv.Content = LayoutRoot; // Grid control |
| newPane.Content = sv; |
| newPane.MouseLeftButtonDown += new MouseButtonEventHandler(newPane_MouseLeftButtonDown); |
| newPane.MouseLeftButtonUp += new MouseButtonEventHandler(newPane_MouseLeftButtonUp); |
| newPane.GotFocus += new RoutedEventHandler(newPane_GotFocus); |
| // newPane.LostFocus += new RoutedEventHandler(newPane_LostFocus); |
| newPane.MouseEnter += new MouseEventHandler(newPane_MouseEnter); |
| this.mapGroup.Items.Add(newPane); |
Try to remove a pane:
| RadPane pane = mapGroup.SelectedPane; |
| if (null != pane) |
| { |
| pane.RemoveFromParent(); |
| rightMapGroup.Items.Add(pane); |
| } |
"A first chance exception of type:
System.Windows.Markup.XamlParseException occurred in
System.Windows.dll
Additional information: AG_E_UNKOWN_ERROR [line 2 position 309]"
I get the same result with
mapGroup.RemovePane(pane);
What am I doing wrong?
Thanks for the help.