我有以下代码以编程方式创建RadDock:
public void CreateDock(Control parent)
{
RadDock dock = new RadDock();
DocumentContainer docContainerLeft = new DocumentContainer();
docContainerLeft.SizeInfo.SizeMode = Telerik.WinControls.UI.Docking.SplitPanelSizeMode.Fill;
DocumentTabStrip leftDocStrip = new DocumentTabStrip();
DocumentWindow leftDoc = new DocumentWindow("Left");
leftDocStrip.Controls.Add(leftDoc);
docContainerLeft.Controls.Add(leftDocStrip);
DocumentContainer docContainerRight = new DocumentContainer();
docContainerRight.SizeInfo.SizeMode = Telerik.WinControls.UI.Docking.SplitPanelSizeMode.Fill;
DocumentTabStrip rightDocStrip = new DocumentTabStrip();
DocumentWindow rightDoc = new DocumentWindow("Right");
rightDocStrip.Controls.Add(rightDoc);
docContainerRight.Controls.Add(rightDocStrip);
RadSplitContainer middleSplitter = new RadSplitContainer(Orientation.Vertical);
middleSplitter.Dock = DockStyle.Fill;
middleSplitter.SizeInfo.SizeMode = SplitPanelSizeMode.Fill;
middleSplitter.Controls.Add(docContainerLeft);
middleSplitter.Controls.Add(docContainerRight);
dock.Controls.Add(middleSplitter);
ToolWindow transferWindow = new ToolWindow();
transferWindow.Text = "Transfer Queue";
transferWindow.DockState = DockState.Docked;
dock.DockWindow(transferWindow, DockPosition.Bottom);
dock.Dock = DockStyle.Fill;
parent.Controls.Add(dock);
}
我正在尝试让middleSplitter适应窗口。然而,底部总是有一个不需要的区域。我在这里有一张照片,但是我不允许发布图像。
我的问题是:如何避免不需要的区域并使Splitter填满窗口?
答案 0 :(得分:0)
在这种情况下,RadDock的DockWindow方法可能会有所帮助。以下是如何实现所需外观: DocumentWindow middleDoc = new DocumentWindow(" Middle"); dock.AddDocument(middleDoc);
DocumentWindow leftDoc = new DocumentWindow("Left");
dock.DockWindow(leftDoc, middleDoc, DockPosition.Top);
DocumentWindow rightDoc = new DocumentWindow("Right");
dock.DockWindow(rightDoc, leftDoc, DockPosition.Right);
ToolWindow transferWindow = new ToolWindow();
transferWindow.Text = "Transfer Queue";
transferWindow.DockState = DockState.Docked;
dock.DockWindow(transferWindow, DockPosition.Bottom);
中提供了更多信息和示例