Hi All,
I ran across the same issue as described in the following link, http://community.infragistics.com/forums/t/1113.aspx
I tried the solution proposed and it worked to a large extent. When I click on the X button I get a panehidden message, where I close my control and dispose the dockcontrolpane. When I save and load the layout, I get a empty panel in the top left corner. After playing around with it quite a bit I couldn't get around removing the blank panel.
Is there a solution for this? Can you point me in the right direction ?
See my creation code and remove code below,
.// My usercontrol
LiveVariableDataControl wpf = new LiveVariableDataControl();
wpf.Size = new Size(200, 200);
UltraTile tile = new UltraTile();
tile.Control = wpf;
UltraTilePanel tilep = new UltraTilePanel();
tilep.TileSettings.ShowCloseButton = Infragistics.Win.DefaultableBoolean.True;
tilep.Appearance.BackColor = Color.Transparent;
tilep.add(tile);
DockableControlPane dockableControlPane1 = new DockableControlPane(tilep);
dockableControlPane1.Size = new Size(210, 210);
dockableControlPane1.Settings.Appearance.BackColor = Color.Transparent;
DockAreaPane flpane = MainFormDockManager.DockAreas.Add(DockedLocation.DockedLeft);
flpane.Panes.Add(dockableControlPane1);
flpane.Closed = false;
flpane.Tag = id;
flpane.Size = new System.Drawing.Size(264, 583);
flpane.Settings.Appearance.BackColor = Color.Transparent;
//Pane Hidden method
private void MainFormDockManager_PaneHidden(object sender, PaneHiddenEventArgs e)
{
removeControlPaneAndChildren(e.Pane);
e.Pane.Closed = true;
}
private void removeControlPaneAndChildren(DockableControlPane pane)
UltraTilePanel tilep = pane.Control as UltraTilePanel;
if (tilep != null)
while (tilep.Tiles.Count > 0)
UltraTile tile = tilep.Tiles[0];
IUIControl ctrl = (IUIControl)tile.Control;
ctrl.close();
tile.Control.Dispose();
tilep.Tiles.Remove(tile);
tile.Dispose();
pane.Dispose();
Any help is greatly appreciated
Thanks!
Hello Suvinay,
Have you been able to resolve your issue ? Did you have a time to take a look at the attached sample.
Let me know if you have any further questions.
Regards
ssinha said:The only issue I came across is that every time I add a new dock panel from the menu, I have to use a unique key otherwise it complains about the key already exists. That means the dockcontrolpane is not disposed but it is jut in a hidden state.
You are right about this, but if you are using my suggestion at the beginning of this thread, you could achieve desired behavior. I already made changes in the sample. Please take a look at the latest modification (see current attachment) Also take a look at the attached video file for more details.
Let me know if you have any questions
Hi Georgi,
Your modification to t he code works well even if I don't do the manual removal of the control and disposing it off. The only issue I came across is that every time I add a new dock panel from the menu, I have to use a unique key otherwise it complains about the key already exists. That means the dockcontrolpane is not disposed but it is jut in a hidden state.
I guess for now I wil manually dispose off so that I can get rid of it completely. I guess you all have to add a property in the dockmanager so that if it is set to true, dockmanager disposes everything when we close instead of hiding it.
Thanks,
-Suvinay
Thanks for provided information. I was able to reproduce your issue, but the mentioned behavior is expected after your modification into our sample ( from our Sample browser ), because you when you remove the control Pane, our UltraTilePanel still exist and its parent is the Form, thats why it is appear at the top left corner. Also I made small mofification in the code which create and dock your UltraTilePanel. Could you please take a look at the modifications that I made in the sample and attached video file for more details and let me know if you have any questions.
I am using the same version as yours. I updated it last Friday before reproducing the issue.
Please see the attached screen shots for reference and follow the steps below to reproduce the issue,
1, Modify the code so that it shows exactly like the one below,
2. Compile and Launch the App.
3. Click on the "Add Dock Panel" Menu as shown in the picture below ( #1 in the picture )
4.You will see a new dockpane with title "Test Control Pane" attached to the app as shown in the picture above ( #2 and #3).
5. Click on the close button of the newly created dock pane with the title "Test Control Pane" ( marked #3 in the picture above).
6. After closing it, you will see blank pane attached to the top left corner as shown in the picture below.
Hope it helps.