Select to view content in your preferred language

DrawText is marked Obsolete - but what is its replacement?

484
1
04-20-2012 12:14 PM
DavidMarley
Frequent Contributor
I have a custom ArcGIS Mobile application that I am porting from 9.3.1 to 10.  It uses the ESRI.ArcGIS.Mobile.Display.DrawText method, and under 10 this method is marked as obsolete - producing the following warning:

'ESRI.ArcGIS.Mobile.Display.DrawText(string, System.Drawing.Font, System.Drawing.SolidBrush, ESRI.ArcGIS.Mobile.Geometries.Coordinate, ESRI.ArcGIS.Mobile.TextAlignment)' is obsolete

But there is no documentation or information on what we should use in its place. 

Anyone have any ideas?
0 Kudos
1 Reply
DavidMarley
Frequent Contributor
Found the answer to my own question.  There is an additional overridden method that takes two Colors, instead of the SolidBrush, and this method signature is not marked obsolete.

public void DrawText( 
   string text,
   Font font,
   Color textColor,
   Color edgeColor,
   Coordinate coordinate,
   TextAlignment align
)


Not quite sure how I missed this the first time.
0 Kudos