Arcengine selected polygon feature style modifications

Source: Internet
Author: User

            //using only the first five lines, you can directly change the color of the selected polygon features to red, which is the fill colorIrgbcolor prgbcolor=NewRgbColor (); Prgbcolor.red=255; Prgbcolor.green=0; Prgbcolor.blue=0; Ifeatureselection pftselection= Pfeaturelayer asifeatureselection; //symbol edge color, below the five lines set the edge of the selected face, but need to cooperate with the code behind the executionIrgbcolor Plinecolor =NewRgbColor (); Plinecolor.red=255; Ilinesymbol ILSYMBL=NewSimplelinesymbolclass (); Ilsymbl.color=Plinecolor; Ilsymbl.width=3; //defining the symbol for the selected feature is red, and the role of this part is not clear, and then you may need to studyIsimplefillsymbol Ipsimplefillsymbol =NewSimplefillsymbol (); Ipsimplefillsymbol.outline=ILSYMBL; RgbColor Pfillcolor=NewRgbColor (); Pfillcolor.green= -; Ipsimplefillsymbol.color=Pfillcolor; Ipsimplefillsymbol.style= Esrisimplefillstyle.esrisfsnull;//set to fill effect is empty, that is, not filled, there are many fill effects, this is an enumeration//Ipsimplefillsymbol.style = esrisimplefillstyle.esrisfsforwarddiagonal; //Select a feature set, where you need to convert Pfeaturelayer to IfeatureselectionIfeatureselection pftselection = Pfeaturelayer asifeatureselection; Pftselection.setselectionsymbol=true; Pftselection.selectionsymbol= (Isymbol) Ipsimplefillsymbol;

Arcengine development is really difficult to get started, so here hurriedly write down, of course, the code here is through the online search code and modified, record, you can use, others can also use

Arcengine selected polygon feature style modifications

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.