【问题标题】:Location and Size are not responding on an OxyPlot Object in C#位置和大小在 C# 中的 OxyPlot 对象上没有响应
【发布时间】:2013-11-23 16:29:20
【问题描述】:

我似乎在修复 Plot 的位置和大小时遇到​​了问题。这是正常的还是我错过了什么?

我的代码是这样的:

GPlot.Model = new PlotModel();
GPlot.Dock = DockStyle.Fill;
GPlot.Enabled = true;
GPlot.Parent = Top_Tabs.TabPages[2]; // Putting it on a Tab

// At this point the Location And Size of GPlot, are those of the containing parent

GPlot.Location = new System.Drawing.Point(279, 224);
GPlot.Size = new System.Drawing.Size(10, 10);

// Last Two lines had no effect.

this.Matlab.Controls.Add(GPlot);

谢谢

【问题讨论】:

    标签: c# plot controls oxyplot


    【解决方案1】:

    删除这一行:

    GPlot.Dock = DockStyle.Fill;
    

    DockStyle.Fill 表示:设置控件的大小和位置以完全适合其父级的 ClientRectangle。它会忽略您手动设置的位置和大小。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-07-31
      • 1970-01-01
      • 2010-11-23
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多