没有什么理由可以陷入这样的问题.源代码可用,标题为"参考源".获得它的最佳方法是使用.NET Mass Downloader.并非每个.NET程序集都公布了其源代码,您的备份是值得尊敬的Reflector.
Anyhoo,源代码看起来大致如下:
private byte layoutSuspendCount;
public void SuspendLayout() {
layoutSuspendCount++;
if (layoutSuspendCount == 1) OnLayoutSuspended();
}
public void ResumeLayout() {
ResumeLayout(true);
}
public void ResumeLayout(bool performLayout) {
if (layoutSuspendCount > 0) {
if (layoutSuspendCount == 1) OnLayoutResuming(performLayout);
layoutSuspendCount--;
if (layoutSuspendCount == 0 && performLayout) {
PerformLayout();
}
}
}
internal void PerformLayout(LayoutEventArgs args) {
if (layoutSuspendCount > 0) {
//...
return;
}
//etc...
}
Run Code Online (Sandbox Code Playgroud)
所以你的问题的答案是:是的.