Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2334
UltraTab in VS.NET 2008
posted

I have an issue when using the UltraTabControl in Visual Studio 2008.  When the form is closed an exception is thrown in the Dispose method of the form.  The stack trace is below and you can see that it stems from the Dispose of the UltraTab control.  The error message is: "Object of type 'System.EventHandler' cannot be converted to type 'Infragistics.Win.UltraWinTabControl.ActiveTabChangedEventHandler"

This happens every time I run my project then stop debugging.  After this happens, any changes I make in the designer _are not saved_ in the form.designer.cs file!  If I run the project my changes do not exist.  If I close the form designer then reopen, all my changes are lost!

Any ideas??  Thanks.

 Drew 

System.ArgumentException occurred
  Message="Object of type 'System.EventHandler' cannot be converted to type 'Infragistics.Win.UltraWinTabControl.ActiveTabChangedEventHandler'."
  Source="mscorlib"
  StackTrace:
       at System.RuntimeType.CheckValue(Object value, Binder binder, CultureInfo culture, BindingFlags invokeAttr)
       at System.Reflection.MethodBase.CheckArguments(Object[ parameters, Binder binder, BindingFlags invokeAttr, CultureInfo culture, Signature sig)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[ parameters, CultureInfo culture, Boolean skipVisibilityChecks)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[ parameters, CultureInfo culture)
       at System.ComponentModel.ReflectEventDescriptor.RemoveEventHandler(Object component, Delegate value)
       at System.ComponentModel.ReflectPropertyDescriptor.RemoveValueChanged(Object component, EventHandler handler)
       at System.Windows.Forms.Binding.BindTarget(Boolean bind)
       at System.Windows.Forms.Binding.SetBindableComponent(IBindableComponent value)
       at System.Windows.Forms.ControlBindingsCollection.ClearCore()
       at System.Windows.Forms.ControlBindingsCollection.Clear()
       at Infragistics.Win.UltraControlBase.Dispose(Boolean disposing)
       at Infragistics.Win.UltraWinTabControl.UltraTabControlBase.Dispose(Boolean disposing)
       at Infragistics.Win.UltraWinTabControl.UltraTabControl.Dispose(Boolean disposing)
       at System.ComponentModel.Component.Dispose()
       at System.Windows.Forms.Control.Dispose(Boolean disposing)
       at Infragistics.Win.IGPanel.Dispose(Boolean disposing)
       at Infragistics.Win.UltraWinTabControl.UltraTabPageControl.Dispose(Boolean disposing)
       at System.ComponentModel.Component.Dispose()
       at System.Windows.Forms.Control.Dispose(Boolean disposing)
       at Infragistics.Win.UltraControlBase.Dispose(Boolean disposing)
       at Infragistics.Win.UltraWinTabControl.UltraTabControlBase.Dispose(Boolean disposing)
       at Infragistics.Win.UltraWinTabControl.UltraTabControl.Dispose(Boolean disposing)
       at System.ComponentModel.Component.Dispose()
       at System.Windows.Forms.Control.Dispose(Boolean disposing)
       at System.ComponentModel.Component.Dispose()
       at System.Windows.Forms.Control.Dispose(Boolean disposing)
       at System.Windows.Forms.Form.Dispose(Boolean disposing)
       at OftsDesk.TransactionEntry.Dispose(Boolean disposing) in C:\proj\OFTS\OftsDesk\trunk\OftsDesk\TransactionEntry.Designer.cs:line 31
  InnerException:

 

Parents
  • 54937
    Verified Answer
    Offline posted

    It sounds like your using the simple binding infrastructure of .Net. If so, you should not be binding to the ActiveTab property as that property is not bindable. When you use simple binding, the Binding class looks for an event with a name like PropertyNameChanged and it assumes it to be of type eventhandler but the ActiveTab property is not marked as bindable and the event ActiveTabChanged is not of that delegate type.

Reply Children