J
JPK
I am having trouble tracking down exactly where some of my general code is
being called when attempting to open the Designer in VS for one of my custom
controls. I have added " if ( DesignMode ) return; ' to all of my
disigner code, but somehow this is still being called. I wouyld like to add
if ( DesignMode ) return to this method (SomeNonUIMethod)" but DesignMode is
not usable in this non UI class. So, is there a way to tell if I am in the
Designer some other way??
Thanks,
JIM
ERROR MESSAGE VS DESIGNER::
I get this ::
Method not found: 'SomeClass SomeNonUIMethod()'.
Instances of this error (1)
1. Hide Call Stack
at System.ComponentModel.ReflectPropertyDescriptor.SetValue(Object
component, Object value)
at System.ComponentModel.Design.InheritedPropertyDescriptor.SetValue(Object
component, Object value)
at
System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializePropertyAssignStatement(IDesignerSerializationManager
manager, CodeAssignStatement statement, CodePropertyReferenceExpression
propertyReferenceEx, Boolean reportError)
at
System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeAssignStatement(IDesignerSerializationManager
manager, CodeAssignStatement statement)
at
System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager
manager, CodeStatement statement)
being called when attempting to open the Designer in VS for one of my custom
controls. I have added " if ( DesignMode ) return; ' to all of my
disigner code, but somehow this is still being called. I wouyld like to add
if ( DesignMode ) return to this method (SomeNonUIMethod)" but DesignMode is
not usable in this non UI class. So, is there a way to tell if I am in the
Designer some other way??
Thanks,
JIM
ERROR MESSAGE VS DESIGNER::
I get this ::
Method not found: 'SomeClass SomeNonUIMethod()'.
Instances of this error (1)
1. Hide Call Stack
at System.ComponentModel.ReflectPropertyDescriptor.SetValue(Object
component, Object value)
at System.ComponentModel.Design.InheritedPropertyDescriptor.SetValue(Object
component, Object value)
at
System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializePropertyAssignStatement(IDesignerSerializationManager
manager, CodeAssignStatement statement, CodePropertyReferenceExpression
propertyReferenceEx, Boolean reportError)
at
System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeAssignStatement(IDesignerSerializationManager
manager, CodeAssignStatement statement)
at
System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager
manager, CodeStatement statement)