Open lroy890 opened 10 years ago
Hello lroy890,
How does your ELXView
look like?
Hello Andreas,
My ELXView inherits from DockContent:
Partial Class ELXView Inherits WeifenLuo.WinFormsUI.Docking.DockContent : :
And DockContent inherits from Windows.Forms.Form:
using System; using System.ComponentModel; using System.Drawing; using System.Windows.Forms; using System.Runtime.InteropServices; using System.Diagnostics.CodeAnalysis;
namespace WeifenLuo.WinFormsUI.Docking
{
public class DockContent : Form, IDockContent
{
:
:
If I change my viewer to inherit directly from Windows.Forms.Form, all is well with the designer:
Public Partial Class Viewer Inherits System.Windows.Forms.Form 'Inherits ELXView : :
If I inherit from ELXView, designer is not happy:
Public Partial Class Viewer 'Inherits System.Windows.Forms.Form Inherits ELXView : :
Error message when I click on the Design tab is:
Failed to load designer. Check the source code for syntax errors and check if all references are available.
ICSharpCode.FormsDesigner.FormsDesignerLoadException: Could not find InitializeComponent method in any part of the open class. at ICSharpCode.FormsDesigner.AbstractDesignerGenerator.GetSourceFiles(OpenedFile& designerCodeFile) at ICSharpCode.FormsDesigner.FormsDesignerViewContent.LoadInternal(OpenedFile file, Stream stream) at ICSharpCode.SharpDevelop.Gui.AbstractViewContentHandlingLoadErrors.Load(OpenedFile file, Stream stream)
On Oct 21, 2014, at 7:17 PM, Andreas Weizel notifications@github.com wrote:
Hello lroy890,
How does your ELXView look like?
— Reply to this email directly or view it on GitHub.
Larry Roy lroy890@gmail.com
I am using the latest 4.4 build of SharpDevelop, and it really works well for my project.
I have a form that inherits from Windows.Forms.Form, and I get the following error when I click on the "Design" tab in the code editor:
Failed to load designer. Check the source code for syntax errors and check if all references are available.
ICSharpCode.FormsDesigner.FormsDesignerLoadException: Could not find InitializeComponent method in any part of the open class. at ICSharpCode.FormsDesigner.AbstractDesignerGenerator.GetSourceFiles(OpenedFile& designerCodeFile) at ICSharpCode.FormsDesigner.FormsDesignerViewContent.LoadInternal(OpenedFile file, Stream stream) at ICSharpCode.SharpDevelop.Gui.AbstractViewContentHandlingLoadErrors.Load(OpenedFile file, Stream stream)
My project loads and the form designer loads without issue on Visual Studio 2010.
My workaround for this issue on SharpDevelop is to switch the comment from my "ELXView" class to the "Windows.Forms.Form' class:
' ' Created by SharpDevelop. ' User: Larry ' Date: 10/4/2014 ' Time: 11:32 AM ' ' To change this template use Tools | Options | Coding | Edit Standard Headers. ' Partial Class Viewer Inherits System.Windows.Forms.Form 'Inherits ELXView