I have the following Page defined in XAML:
<Page ...> <DockPanel> <igDock:XamDockManager> <igDock:XamDockManager.Panes> <igDock:SplitPane> <igDock:TabGroupPane Name="tgp" />
I also have the following UserControl defined in XAML:
<UserControl x:Class="MyNamespace.MyClass" ...> <igDock:XamDockManager> <igDock:XamDockManager.Panes> <igDock:SplitPane> <igDock:ContentPane Name="cp1" AllowClose="False" /> <igDock:ContentPane Name="cp2" AllowClose="True" />
I then add instances of MyClass to TabGroupPane tgp using the following code:
ContentPane cpNew = new ContentPane();cpNew.Content = new MyClass();tgp.Items.Add(cpNew);
The problem I am having is that the close button of ContentPane cp1 in my UserControl is enabled even though I've specified AllowClose="False". However, when pressed, it actually closes the entire nesting ContentPane cpNew created in the code. It's like the close buttons on nested ContentPane panes' headers within cpNew are really copies of the close button on cpNew's header. Interestingly, if I set cpNew.AllowClose = false in my code before adding it to tgp, the close button of the nested ContentPane pane cp2 is enabled when selected but disabled when cp1 is selected. But when I press it, it closes cp2 as I would expect but cáusés the Closed event handler of the nesting ContentPane cpNew to fire!
What I want is to be able to have cp1 and cp2's close buttons affect just those panes and the enabled status of those close buttons to be configured separately to the nesting ContentPane.
Is the scenario described above by design or is this a problem with ContentPane?
This sounds like a bug that has already been addressed in one of the recent hotfixes. I would recommend checking the downloads available to you or contacting the support group to obtain access to the latest hotfix. If the issue persists then I would recommend submitting the issue to the support group.
How do I obtain these recent hotfixes? I have checked the version I am using of XamDockManager - it is 8.2.20082.1002 - and this is from the March 2009 download from your website.