ThinkGeo.com    |     Documentation    |     Premium Support

Hatched Area Style questions

Hello,


For a little background information, our application allows for users to add layers of various different sources, apply typical or value based symbology, save this configurations and reload them for later use. This is a fairly common thing.


We have omitted use of displaying hatches and line dashes and what not for a while now due to prior time constraints. User demand for this is now high and I am integrating these features in.


Ok, enough of that. Now for the question...


Once I have applied a hatch style to an areaStyle, is there a means to detect which hatch I used? It is critical that I be able to do this for various reasons. If a user wishes to edit symbology for a layer he has previously assigned, I must be able to pull up the currently applied symbology in the symbol editor and this would include being able to display the current hatch in use.


The line caps and dashes work nicely like the rest of the component because these criteria are accessible via object properties, but I don't immediately see where the hatch properties are. I am fearing that they do not exist at all due to the nature you create a hatch style at all via AreaStyles.CreateHatchStyle.


How can I look at a layers AreaStyle and programatically determine its hatch style as it relates to the GeoHatchStyle Enumeration?


Thanks,


Nelson



Nelson, 
  
 Thanks for the detail information of your question. 
  
 If you create a hatch style by using AreaStyles.CreateHatchStyle, the hatch brush will be assigned to the Advanced.FillCustomBrush propety of the AreaStyle, you only need convert its type to GeoHatchBrush, and then you can get the GeoHatchStyle from it. 
  
 If your requirement is like this, please let me know. 
  
 Thanks 
 James

This is perfect, James. Thanks!

We are glad you have your issue resolved. Any other questions, let us know.