Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am working with PageLayoutControl, its mapframe include elements: lines, texts. And I am getting an error when zooming: If I zoom the pagelayout to 100% ( smaller than 110%), it can display "Dash Lines". But, if zoom to 120% (or larger), all "dash lines" become "solid lines". Please see attached screenshots:zoom to 100%

zoom to 120%

And another problem: when I print the pagelayout, all dash lines become solid lines.

Are there anyone know what's wrong ?

Thanks and regards,


share|improve this question
And I thought I was picky! Sorry to say I don't know what might be causing that. If you can create a Short, Self Contained, Correct (Compilable), Example (SSCCE) that exhibits the issue and host it somewhere, perhaps someone will be able to help you. Otherwise that seems like a pretty minor problem to me and I would just say "deal with it" to the customer. – blah238 Nov 1 '12 at 5:02
Thanks blah. If I use the zoom command of Map, it is ok. But, when I use the zoom command of PageLayout, it is not ok (dash lines become solid lines). Do you have any ideas ? – taibc Nov 1 '12 at 8:14
Hi, I created and uploaded demo example. Please download at the link: . Thank you for your help – taibc Nov 3 '12 at 7:21
Got it to compile at 10.1 SP1 after some fiddling and I can confirm I'm seeing the same thing. The dotted and dashed lines become solid lines once you zoom in past a certain point in layout mode. – blah238 Nov 3 '12 at 9:16
Here is the 10.x version if anyone's interested: – blah238 Nov 3 '12 at 9:21
up vote 3 down vote accepted

Turns out this is a known issue and has to do with how Simple Line Symbols are drawn using GDI. If the line width exceeds 1 point when displayed, it is drawn as a solid line. The workaround is to use a Cartographic Line Symbol instead.

share|improve this answer
Thanks blah238, Could you give me an example how to create a dot line and dash line with Cartographic Line Symbol ? – taibc Nov 5 '12 at 1:47
There is a dashed line example in my 3rd link:… – blah238 Nov 5 '12 at 2:13
Thank you. But I don't understand about values: pttrn, for example: pttrn[1] = 7 (why is it 7 ?? not 9, or 10). How can I change it to create a dash line like this: - - - - - - - or dot line: . . . . . . . – taibc Nov 5 '12 at 2:22
I can do now. Thank you for your help – taibc Nov 5 '12 at 3:15

By replacing the interface ISimpleLineSymbol by the interface ILineSymbol, the program works without problems of zoom, the main obstacle for using ILineSymbol object that it has'nt style attribut, i searched about setting style for ILineSymbol but without a result.

in my case i use this code to get the symbol from a symbology control.

ILineSymbol line_symbol = (ILineSymbol)symbolForm.GetItem(esriSymbologyStyleClass.esriStyleClassLineSymbols, (((lyr as IFeatureLayer) as IGeoFeatureLayer).Renderer as ISimpleRenderer).Symbol  )  ; 

you can find the GetItem in this sample C# script

i tested the program using a serialized ILineSymbol object in an XML file , you will find the test version in this link.

share|improve this answer
Thanks geogeek, but I don't know how to use your way to create a dash line: - - - - - - - - - or dot line: ............. I am not clear about xml file, it doesn't contain dash style or dot style ? – taibc Nov 5 '12 at 2:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.