如果我最小化WPF,SplitContainer的例外情况 [英] Exception for SplitContainer if I minimize WPF

查看:85
本文介绍了如果我最小化WPF,SplitContainer的例外情况的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



每当我尝试将以下代码的SplitContainer的窗体最小化时,我都会收到异常。



  private   void  FrmMain_Resize( object  sender,EventArgs e)
{
this .xSpliterMain.Dock = System.Windows.Forms.DockStyle.Fill;
}





问候,

Vaibhav

解决方案

代码示例未充分显示,即使在所述行中抛出异常,因为此异常表示您处于无限递归相互递归

http://en.wikipedia.org/wiki/Recursion [ ^ ],

http://en.wikipedia.org/wiki/Recursion_(computer_science) [ ^ ],

http://en.wikipedia.org/wiki/Mutual_exclusion [ ^ ]。



通过观察溢出的调用堆栈来发现问题。在这条线上设一个断点;你会看到一次又一次地在这行代码上停止执行。当它停止时,打开调试窗口调用堆栈,你会看到它来自哪里。



-SA

Hi,
I get an exception whenever I tries to minimize my windows Form for SplitContainer for below code.

private void FrmMain_Resize(object sender, EventArgs e)
{
  this.xSpliterMain.Dock = System.Windows.Forms.DockStyle.Fill;
}



Regards,
Vaibhav

解决方案

The code sample is not adequately shown, even of the exception is thrown in a said line, because this exception indicates that you have in "infinite" recursion or mutual recursion:
http://en.wikipedia.org/wiki/Recursion[^],
http://en.wikipedia.org/wiki/Recursion_(computer_science)[^],
http://en.wikipedia.org/wiki/Mutual_exclusion[^].

The problem is spotted by observing the call stack which is overflown. Put a break point on this line; you will see that execution is stopped on this line of code again and again. When it stops, open the Debug Window "Call stack", and you will see where it comes from.

—SA


这篇关于如果我最小化WPF,SplitContainer的例外情况的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆