I am getting the attached error in the designer after adding the TrackEnded event. The code compiles fine and seems to work fine but the designer no longer works.
Here is the code that I added to the designer.cs file:
this.mapControl.TrackOverlay.TrackEnded += new System.EventHandler<ThinkGeo.MapSuite.DesktopEdition.TrackEndedTrackInteractiveOverlayEventArgs>(this.TrackOverlay_TrackEnded);
I am using 3.0.362 with VS 2008 and if I comment out the hooking up of the event all is fine. But, when I uncomment again I get the same error. I have the hooking up of the event in the *.Designer.cs file under the windows form designer generated code section.
So you are trying to use the e.Cancel property in this event? And Following is the error information?
‘ThinkGeo.MapSuite.DesktopEdition.TrackEndedTrackInteractiveOverlayEventArgs.Cancel’ is obsolete: ‘This Property is obsolete and will be removed from next release, we recommend you use . The Cancel is removed for this event args. Use the TrackEnding event instead to use functionality.’
If so, that is correct, we will delete the e.Cancel property in later version package and now it is marked as obsolete information.
No, that is not the case. I did not even mention using e.Cancel in my post. I do not want to use the TrackEnding event because everytime I stop moving the mouse the event is fired. This is most definitely associated with the designer from what I can tell and it has something to do with the event hooking.
While it seems controls in .net will also have similar problem, I have no idea why this occurs. If you hook up the event in the same way for DataGridView, it will also have same problem. this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dataGridView1.Location = new System.Drawing.Point(608, 69); this.dataGridView1.Name = "dataGridView1"; this.dataGridView1.Size = new System.Drawing.Size(123, 150); this.dataGridView1.TabIndex = 3; this.dataGridView1.Rows.CollectionChanged += new System.ComponentModel.CollectionChangeEventHandler(Columns_CollectionChanged);