Hi,
Initially i show a content pane in document as tabbed.
Now I want to change from tabbed to DockRight.
I used the following code,
contentpane.ExecuteCommand(
ContentPaneCommands.ChangeToDockable);
Then what i have to do the pane come as DockedRight?
Please help me regarding this.
By
Ramesh.P
ChangeToDockable will behave just the same as if you right click on the pane and choose the Dockable option. I.e. If the pane is already dockable (i.e. DockedLeft|Right|Bottom|Top|Floating) then nothing happens. If it was dockable at one point we restore it to the last dockable location (unless its floating only and then we try to make it floating). Otherwise we try to put it in a new dockable container that is either floating, docked left, docked bottom, docked right, docked top depending on the first one of those that is allowed based on the AllowDockingXXX properties. So if its a Document and its never been dockable and you want to default it to docking on the right you could disable the other allowdocking properties temporarily while you use the ChangeToDockable command.
There is currently nothing in the object model that will move a pane into a new container since there are so many possibilities for where you might want it to be. Basically to handle this programatically you would have to create a SplitPane, set its InitialLocation to DockedRight, add it to the control's Panes collection, remove the ContentPane from its current parent and add it to the Panes collection of that split pane.