Changing the transparency of a raster layer with ArcObjects

المشرف العام

Administrator
طاقم الإدارة
I'm trying to do some simple things with the .net framework and ArcObjects, but have little experience with this type of development. I would like to iterate through the layers in a map document and change the transparency of the raster layers who's names begin with the letter "g". Here is what I have so far as part of a windows form.

private void button1_Click(object sender, EventArgs e){ IMxDocument mxdoc = ArcMap.Application.Document as IMxDocument; IMap map = mxdoc.FocusMap; for (int i = 0; i < (map.LayerCount - 1); i++) { ILayer currentLayer = map.get_Layer(i); if (currentLayer.Name[0].ToString() == "g") { //current layer transparency = 50% } }}the line that is commented out is where I need help. I can't seem to find the right code to do what I want within the ILayer class. Is this not what I should be using?



أكثر...
 
أعلى