By default, all tool windows that are added to a Dock-layout Manager's ToolWindows collection will be in a floating state (unless their state has been modified). To provide the end-users with a default layout, 2 options can be used:
Use the DockTo method to position the tool windows contained in the dock-layout manager's tool windows collection in the desired location.
Load the application, place the tool windows in the desired location, and save the layout using the SaveLayout method. The layout that is created can then be added to the application's resources or distributed side-by-side with the application and loaded when the end-user has not saved a new layout.
The following example demonstrates how to load a default layout that is embedded into an application's resource when the end-user has not saved a new layout. This example assumes that an instance of the DockLayoutManager class named m_manager exists and that tool windows have been added to its ToolWindows collection. This example also assumes that the default layout is named "default_layout.xml" and that the end-users new layout is named "custom_layout.xml".
VB.NET | Copy Code |
---|---|
|
C# | Copy Code |
---|---|
|