Select to view content in your preferred language

Parts of Graphics Chopped Off in 3.0 API

1707
1
10-17-2012 12:59 PM
AndyWright
Frequent Contributor
I have a Silverlight application that I developed back when the Silverlight 2.0 API came out.  I've been upgrading every time ESRI has come out with a new API and have yet to have any problems.  That changed with version 3.0.  I have some tools in my application that allow users to draw graphics on the map - points, lines, circles, rectangles, e.t.c.  Those tools have worked fine from version 2.0 up through 2.4.  I upgraded to the 3.0 API a few months ago, and just recently noticed that the southern and eastern edges of most of the graphics I draw are getting slightly chopped off.  It's almost as if the bounding boxes of the graphics are now a little smaller than they have been in previous versions of the API.

This has nothing to do with my code, as it's been the same since version 2.0.  Something in the 3.0 API appears to be causing this.  Before I start beating my head against the wall trying to figure this out, I figured I'd post to the forum in hopes that one of ESRI's Silverlight developers can shed some light on changes in the 3.0 API that may have caused this to happen.  I assume I will have to make some changes to my code to adapt to the differences in the 3.0 API, but it would be great if someone could point me in the right direction.

I attached two images that show some shapes I drew in version 2.4 - those are fine, and some shapes I drew in 3.0.  You'll notice the edges are chopped off on the eastern and southern sides of those shapes.

Thanks in advance for any help with this ...

Andy
0 Kudos
1 Reply
AndyWright
Frequent Contributor
I figured it out.  I had extended the control template for all of the graphic symbols to include a selection border that only appeared when a selection tool was used to select them.  This border had a Padding property that was set to 2.  After I remove that property, I am now able to draw graphics that look correctly.  I'm not sure what changed in this new API that caused this problem, but this is a decent workaround for me.

Thanks for listening ... 😉
0 Kudos