ser*_*hio 9 .net vb.net visual-studio-2010 windows-forms-designer visual-studio
当尝试在设计模式下打开一个表单(VB.NET),我有一个自定义的UserControl,我看到来自Visual Studio的消息:
---------------------------
Microsoft Visual Studio
---------------------------
The control MyNamespace.MyUserControl has thrown an unhandled exception
in the designer and has been disabled.
Exception:
Cannot access a disposed object.
Object name: 'SplitterPanel'.
Stack trace:
---------------------------
OK
---------------------------
Run Code Online (Sandbox Code Playgroud)
并且表单不会显示在设计器中.该怎么办?
使用调试模式加载项目,并在InitializeComponent()
用户控件的函数上放置断点。您可能会遇到一些错误,即处理名为的对象SplitterPanel
,然后尝试访问它。当 Visual Studio 尝试呈现控件时运行此初始化,从而导致您看到的错误。
归档时间: |
|
查看次数: |
3866 次 |
最近记录: |