4

我有以下代码:

var hWindow1 = new HostWindow(new Control() {Dock= DockStyle.Fill}, DockType.ToolWindow);
radDock1.DockWindow(hWindow1, DockPosition.Left);

var hWindow2 = new HostWindow(new Control() { Dock = DockStyle.Fill }, DockType.ToolWindow);
radDock1.DockWindow(hWindow2, DockPosition.Bottom); 

var hWindow3 = new HostWindow(new Control() { Dock = DockStyle.Fill }, DockType.ToolWindow);
radDock1.DockWindow(hWindow3, DockPosition.Right);            

var hWindow4 = new HostWindow(new Control() { Dock = DockStyle.Fill }, DockType.Document);            
radDock1.DockWindow(hWindow4, DockPosition.Fill);

var hWindow5 = new HostWindow(new Control() { Dock = DockStyle.Fill }, DockType.Document);
radDock1.AddDocument(hWindow5, hWindow1, DockPosition.Fill);

如何以编程方式更改某些 DockWindow 的宽度(例如hWindow3)?

4

1 回答 1

0

假设您的容器是“容器”。您可以将 SizeMode 设置为 Absolute 并设置所需的大小。这个链接非常好。

Container.SizeInfo.SizeMode = SplitPanelSizeMode.Absolute;

Container.SizeInfo.AbsoluteSize = new Size(desiredWidth, desiredHeight);

于 2015-06-01T07:11:07.350 回答