2

Closed

Add layer transparency option

description

Add layer transparency option
Closed Apr 24, 2016 at 2:52 PM by bertt

comments

Frozik wrote Feb 21, 2011 at 5:28 PM

In public void Draw(esriDrawPhase drawPhase, IDisplay display, ITrackCancel trackCancel) you can add before drawing:

// Put in the beginning - Transparency is between 0 and 100, also move this parameter to property page
IDisplayFilter filter = display.Filter;
var displayFilter = new TransparencyDisplayFilterClass();
displayFilter.Transparency = (short)(Transparency * 255 / 100);
display.Filter = displayFilter as ITransparencyDisplayFilter;

// Put in the end
display.Filter = filter;