Windows Develop Bookmark and Share   
 index > Windows Forms Designer > Method Not Found in Designer
 

Method Not Found in Designer

When creating controls and using them in the form designer, I repeated get errors stating one of the control's methods, or a method within the constructor or load event, does not exist when the code compiles and runs without any problem.

Here is an instance:
I have a control library, lets call it MyControls.DLL, that contains the control Axis. Axis has a property called AxisMarkPositions with the attributes DesignerSerializationVisibility = Hidden and Browsable = false.
In a separate solution I have a project, ControlProject, that references MyControls.DLL. FormProject contains a user control, Ruler, that has on it an Axis control. The Paint method of Ruler uses Axis.AxisMarkPositions to determine drawing boundaries. In a second project, FormProject, in the same solution, is a form that has on it a Ruler control. When I attempt to open this form in the form designer I get the error:
Method Not Found: Axis.get_AxisMarkPositions(). Again, all of this compiles and runs fine without any problems.

Is there anything I can do to keep from getting this error?

I am using C# in Visual Studio Professional 2008, .NET 3.5.

Thank you
Flarg  Tuesday, May 12, 2009 3:06 PM
Hi Flarg,


Please try to set the DesignerSerializationVisibility attribute to true, and rebuild the solution. Let me know if this can solve the problem.


Best regards,
Bruce Zhou
Please mark the replies as answers if they help and unmark if they don't.
Bruce.Zhou  Thursday, May 14, 2009 3:20 AM

You can use google to search for other answers

Custom Search

More Threads

• Sharing components between forms.
• UITypeEditor, Component get list of controls
• Imagelist: Embedded Resource problem
• More TreeView Issues - OnMouse and AfterLabelEdit Problem
• can't save collection in disgner
• Missing Flexgrids
• Exposing Child Control events
• create timeline control in c#
• Clearing all text boxes
• Switching forms icons