Dear James,
As per your sugession (To Implement Copy FeatureLayer and TrackZoom), I have changes my old DLL (4.5.0.0) to new DLL (4.5.157.0). It working for new required changes, but it gives problem in my old code.
At one place I have showed my column value of map. its working for old dll but throw exception in new dll.
The code is as below:
Dim CustomTextStyle As TextStyle = New TextStyle
Dim colName As String = drpField.Text.Trim 'The column name of map
System.Windows.Forms.Cursor.Current = Cursors.WaitCursor
Application.DoEvents()
Dim Layer As FeatureLayer = WinformsMap1.FindFeatureLayer("WorldLayer")
CustomTextStyle = TextStyles.CreateSimpleTextStyle(colName, "Arial", 7, DrawingFontStyles.Bold, GeoColor.FromArgb(255, 91, 91, 91))
CustomTextStyle.PointPlacement = PointPlacement.Center
CustomTextStyle.OverlappingRule = LabelOverlappingRule.NoOverlapping
CustomTextStyle.DuplicateRule = LabelDuplicateRule.UnlimitedDuplicateLabels
Layer.ZoomLevelSet.ZoomLevel01.CustomStyles.Add(CustomTextStyle)Layer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20
Application.DoEvents()
WinformsMap1.Refresh()
System.Windows.Forms.Cursor.Current = Cursors.Default
It was running earlier, but now it throw exception like
ArgumentOutOfRangeException was unhandled. Index was out of range. Must be non-negative and less than the size of collection. Parameter Name:index
Please see the problem.
If you want to complete code, please tell me.
Regards
Sanjay